Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I apply changes in package-lock and package json?

I manually changed my dependencies in package-lock.json and package.json files. How do I now apply those changes to my node-modules without updating/touching other dependencies?

like image 332
Massaget Avatar asked Sep 08 '25 10:09

Massaget


1 Answers

Run command

npm i

or

npm install --save

npm i command will install all your dependencies into your local machine which are available in the file.

PS: It is not recommended approach to directly update package.json file, always install package using command npm i packageName --save or npm i packageName --save --dev. This will install as well as Update your package.json file too.

like image 179
Pardeep Jain Avatar answered Sep 10 '25 07:09

Pardeep Jain