The dependencies listed in the JSON package are not in sync with each other

I find the behavior in NPM and the package.json file regarding package dependencies confusing. A prime example is the package gulp-watch. Looking at its package.json file on GitHub, we can see that it has a dependency on

"anymatch": "^3.1.1"
. However, when I install the
"gulp-watch": "^5.0.1"
package and check the yarn.lock file, I notice this:

gulp-watch@^5.0.1:
  version "5.0.1"
  resolved "https://registry.yarnpkg.com/gulp-watch/-/gulp-watch-5.0.1.tgz#83d378752f5bfb46da023e73c17ed1da7066215d"
  integrity sha512-HnTSBdzAOFIT4wmXYPDUn783TaYAq9bpaN05vuZNP5eni3z3aRx0NAKbjhhMYtcq76x4R1wf4oORDGdlrEjuog==
  dependencies:
    ansi-colors "1.1.0"
    anymatch "^1.3.0"
    chokidar "^2.0.0"
    fancy-log "1.3.2"
    glob-parent "^3.0.1"
    object-assign "^4.1.0"
    path-is-absolute "^1.0.1"
    plugin-error "1.0.1"
    readable-stream "^2.2.2"
    slash "^1.0.0"
    vinyl "^2.1.0"
    vinyl-file "^2.0.0"

It seems to be pulling in anymatch "^1.3.0".

Even after deleting both node-modules and the yarn.lock file, the discrepancy persists.

This inconsistency puzzles me, and I wonder why it exists.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

How come the mongoose ref feature is not functioning properly for me when I attempt to reference objects from a different schema?

I'm having trouble accessing the attributes of a store's address, as I keep getting 'undefined'. It seems that the address is only an id, even though I set up a 'ref' in the address schema. What could be causing this issue? H ...

Combine angular ui router templates using grunt into a single file

Currently, I am working on an angular-ui-router project that consists of 150 files scattered all over. My goal is to create a grunt task that will merge all these files into a single index.html file structured like this: <script type="text/ng-template" ...

The passport authentication fails with the error message "Incorrect password" even before triggering the passwordMatch function

This situation is quite odd. My Objective I am attempting to set up an authentication server in node.js using Passportjs local strategy and JWT. This will allow users to register with an email and password, where the passwords are hashed using 'cryp ...

Inject data into Hapi 17 redirection

I have configured a route to switch the locale for users and redirect them back to the page they were on. The locale is passed as a parameter in the URL. After some database operations, I need to pass on the result of the query to the redirected page. Ho ...

What do I need to know about file formats and canceling uploads?

#1 I came across some information in the formidable documentation indicating that we can filter file types: const options = { filter: function ({name, originalFilename, mimetype}) { // only keep images return mimetype && mimetype.includes ...

Leverage Multer in NodeJs to efficiently parse files and selectively trigger storage operations

I am utilizing the NextJS endpoint to receive formData with file/files. In order to determine the file name in the Multer storage, I need to parse the file's data and utilize its metadata. For instance, I aim to create an entry in the database for U ...

Attempting to execute the Angular CLI directive "ng generate module flat true" is proving to be unsuccessful

When I run the command 'ng generate module file.module.ts flat=true' it is supposed to create a module without nesting it inside a folder of the same name. However, I've been encountering an issue where it always creates the folder and place ...

What is preventing the bundling of my CSS into the application?

I'm facing an issue while setting up a new project using vue.js, scss, and webpack (with express.js on the server side and TypeScript). I copied over the configurations from a previous project where everything was working fine. According to my underst ...

Exploring Dynamic Routing using React with Axios and Node.js with Express

My database has 8 tables, each serving as an end-point for different groups. I have multiple routes in my node js/express and sequelize server-side setup to fetch JSON data without having to create separate routes for each table. On the client-side, I&apos ...

Development of a node app along with several node modules happening simultaneously, utilizing npm-link for seamless integration

I've been immersed in building a node.js app while simultaneously working on the necessary modules. The challenge I'm facing involves dealing with peerDependencies and finding the optimal setup for my development environment. Here's what I ...

What is the process for deprecating a project dependency in the package.json file?

Is it feasible to designate a project dependency as outdated without completely removing it from the project? This is to prevent other developers from utilizing it in future projects. I am currently working on a project that was initially developed using ...

Error: Unable to access the `insertUsername` property as it is not defined

When I attempt to submit the login form created by the new.ejs file, instead of being redirected to the expected page, I am encountering an error message that reads: Cannot read property 'insertUsername' of undefined This same error message is ...

Unable to retrieve rxjs resource

After upgrading to rxjs 5.4.3, I encountered an error in the browser. Despite having "rxjs": "5.4.3" installed in my package.json, I cannot seem to resolve this error message. Here's the content of my ts file: import { Injectable ...

To install bower using npm, you can choose to use either -g or --save

As a beginner in node, I am currently discovering npm for working on node, angular, and Express tutorials. While following a previous tutorial, I utilized bower. After running the bower -v command and receiving back 1.3.3, I believe I have installed it glo ...

The image in the Firefox Addon-SDK jpm menuitem module does not display properly on the Tools menubar

Similar yet distinct from: firefox addon icon not showing and firefox extension not showing icons. While those inquiries focused on the API-user's requirement to utilize self.data.url( './icon-16.png' ) and place images in the './data ...

The process of installing dependencies recursively using pnpm

In my monorepo project, I have workspaces A and B. Workspace A depends on B being built first, with each workspace in its own folder as defined in pnpm-workspace.yaml packages: - 'src/mydepa' - 'src/mydepb' { "name": &qu ...

Keeping a consistent session active on Express服务器

While developing a web app with Nodejs and express, I am facing challenges in session management. I have been using req.session.userid = userid, but it seems to be unreliable. If the server goes down and needs to reboot, the session gets lost. Are there ...

What is the method to retrieve the total number of days in a moment-jalaali using NodeJS?

I'm trying to determine the number of days in the moment-jalaali package for NodeJS. Despite checking their API on GitHub, I couldn't find any reference to a specific method like numOfDay. ...

The pdf2json encountered an error when attempting to process a PDF file sent via an HTTP

I am encountering an issue while attempting to extract information from PDF files using a nodejs script. Upon running the program, I encounter the following error: Error: stream must have data at error (eval at <anonymous> (/Users/.../node_modules/ ...

Importing Laravel select2 library is necessary for enhancing user experience and improving

I've been attempting to incorporate select2 into my project without success. Every time I try these two methods, I always receive an error saying $('#state').select2 is not a function. However, when I include select2 in a standard <scrip ...