Questions tagged [package-lock.json]

No instructions have been provided for this tag...yet!

Understanding the differences between npm install and npm update

I've been diving into the nuances between package.json and package-lock.json Recently, I decided to experiment with a package that has only one dependency called chance Upon initial installation using npm i <a href="/cdn-cgi/l/email-protection" c ...

What is the purpose of creating a package-lock.json file when npm already has the npm-shrinkwrap.json for locking dependencies?

npm-shrinkwrap.json: Securing the node_modules tree and its dependencies and sub-dependencies to ensure the package remains stable across different machines. package-lock.json: Safeguarding the node_modules tree along with its dependencies and nested depe ...

Will the package versions listed in package-lock.json change if I update the node version and run npm install?

Imagine this scenario: I run `npm install`, then switch the node version, and run `npm install` again. Will the installed packages in `package-lock.json` and `node_modules` change? (This is considering that the packages were not updated on the npm regist ...

Create multiple package-lock.json files with a suffix for backup purposes

I've observed that npm generates multiple package-lock*.json files in the main directory of my project. I'm uncertain about the purpose of these files and why there are so many being created. Attached is an image displaying the generated files. ...

Setting up package-lock.json as the definitive source of dependencies truth

I had a similar question to the one asked on Stack Overflow about package.json and package-lock.json (in summary; "what's the difference between package.json and package-lock.json?") and found some insightful answers there. However, I still have some relat ...

npm audit fix failing to reflect changes in package.json

After numerous attempts, I have finally found a fix for one vulnerability using npm audit fix. The npm audit report indicates: # Run npm update mkdirp --depth 8 to resolve 10 vulnerabilities ┌───────────────┬── ...

Utilize npm workspaces to refresh the package.json files nested within package-lock.json

I am utilizing npm workspaces to manage a monorepo. One thing I've noticed is that the top-level package-lock.json contains a cached version of each workspace's package.json in its "package" field. How can I update these cached versions without a ...

The npm installation no longer resolves changes from a URL and sets it to false

The Issue Whenever I pull my team's code and execute npm install, the resolved property of certain items in package-lock.json is altered from a URL to false. For example: "debug": { "version": "3.2.6", "resolved": "https://registry.npmjs.org/deb ...

Is there a way for me to identify which dependencies are relying on a specific package within my node_modules directory?

A new feature on Github now notifies users about security vulnerabilities in their package-lock.json. While I want to address these issues, it's challenging to identify which top-level package in my package.json needs an upgrade since most listed pack ...

The npm installation process is failing to generate a fresh package-lock.json file

I accidentally removed my package-lock.json file. Despite running npm install, a new one isn't being generated. Is there a way to prompt npm to recreate this file? ...

Is it common for the version of the package lock file to fluctuate within a team?

In the scenario at hand, a new Developer A has updated npm to version 8.3. After cloning the repository, npm prompts that the package.lock file needs to be upgraded from lockFile format version 1 to version 2. Following this prompt, Developer A checks in t ...