Questions tagged [package-lock.json]
224 questions
1
vote
1 answer
Does cloud foundry nodejs buildpack ignore the prepare script during `npm install`?
I have a web app, nextjs, that gets deployed to Cloud Foundry through a Jenkins pipeline and using a manifest.yml.
In the manifest, I'm declaring it to use a nodejs-buildpack, and set the command field as npm start. During the deployment I noticed…

medev21
- 2,469
- 8
- 31
- 43
1
vote
0 answers
When I install third party library in react native project it throw me "Module does not exist in package.json"?
When I install third party library in react native project it throw me "Module does not exist in package.json" then
I have to delete Node modules
Delete package-lock.json
NPM install
then library start working
why is that?
I try above solution and…

Salman Hamza
- 21
- 1
- 6
1
vote
1 answer
package-lock.json file - how to clean it up?
I am learning Next.js by following: https://nextjs.org/learn/basics/deploying-nextjs-app/setup
My package.json file looks normal:
{
"name": "paths",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next…

Lewis
- 135
- 1
- 10
1
vote
0 answers
whether package-lock.json not contains devDependencies packages in package.json?
As title. I have some packages which only used when I develop. Therefore, I put these packages in devDependencies in package.json
Then when I use npm install --production, and there is no package which in devDependencies in node_modules.. BUT still…

user2956843
- 177
- 1
- 10
1
vote
1 answer
React Native: when I run `npm i`, some dependencies in package-lock.json are different from package.json
In my React Native project, I have a specific version of a library, specifically react-native-permissions@1.1.1, that I need to use in the project. When I run npm i react-native-permissions@1.1.1, everything works fine, but if I re-build the project…

gkeenley
- 6,088
- 8
- 54
- 129
1
vote
0 answers
Why is npm installing a lower version (according to my package-lock.json) than what is specified in my package.json?
After deleting my package-lock.json, and the node modules folder, and running an npm install on my project, I noticed that it is installing a lower version of @babel/core than what is specified in my package.json. It seems to be installing 7.17.12…

connected_user
- 814
- 1
- 9
- 25
1
vote
1 answer
difference between `-- and +-- after running npm list
Whilst addressing GitHub dependabot updates, I've been looking through the dependencies list created after running npm ls -a.
I (think I) understand the nesting involved: a pipe indicates that packages below are part of the dependencies list, and so…

mjwils
- 456
- 4
- 12
1
vote
0 answers
package-lock.json is not generating
I am trying to recreate package-lock.json file after installing some new modules from package.json. But somehow it is now stopped generating the updated package-lock.json file.
The npm version I am using is > 5 currently the version is 8.5.2 and…

JN_newbie
- 5,492
- 14
- 59
- 97
1
vote
1 answer
Overriding nested dependencies in Node.js projects to improve "npm audit" vulnerability report
I got some vulnerabilities resolved in my Node.js project by forcing some nested dependency updates but I need help understanding what's actually happening behind the scene of this improvement.
Here is my original "package.json"
{
"name":…

AliReza
- 706
- 2
- 10
- 30
1
vote
1 answer
tried to update angular to 13 broke a bunch of stuff now trying to go back to angular 11 how to?
First I am the only one working on this project so we can completely nuke everything but the code of course.
I have tried things like this with no effect
npm uninstall -g @angular/cli
npm cache clean
npm install -g @angular/cli@11
when I try to run…

Christopher Jakob
- 453
- 3
- 21
1
vote
1 answer
Huge inserts in package-lock.json
I am new to javascript and just added 2 js code to our appl. One thing I noticed is when I npm install json2csv it inserted more than 10k lines to package-lock.json . My question is that normal? I just dont want to affect other existing codes and…

Gilbert Tuason
- 11
- 2
1
vote
0 answers
How to i reset my node-modules to there original state without this many packages and dependencies?
Every time when i want to start a new NPM node.js project I keep getting an gaigantic package-lock.json file.
When i run npm install it creates a package.json and a package-lock.json file.
my problem is that the package-lock.json file autogenerates…

Marc Gentner
- 51
- 4
1
vote
0 answers
npm audit fails cannot find package-lock
I have this configuration:
$ node -v
v16.13.0
$ npm -v
8.1.2
$ npm config get shrinkwrap
true
$ npm config get package-lock
true
FWIW I'm on macOS 10.15.17 and Node.js is installed via MacPorts.
When I run npm install or npm install…

David Herron
- 898
- 2
- 12
- 22
1
vote
1 answer
NPM v7+ - How to install packages with "lockfileVersion": 1
I updated NodeJS to v16, and it ships with NPM v8, so when I install packages, package-lock.json file is created with "lockfileVersion": 2. I would like to stay with old format of "lockfileVersion": 1. Can we install packages in NPM v8, but keep the…

NeNaD
- 18,172
- 8
- 47
- 89
1
vote
0 answers
Updating dependency within dependency in package-lock.json
On Github, I received a notification saying
Upgrade trim-newlines to version 3.0.1 or later.
It's not in my package.json, so when I looked up where it was using npm ls trim-newlines, I found that it was in node_modules/meow which shows up as:
└─┬…

Brian Tang
- 53
- 3