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?
Asked
Active
Viewed 7,478 times
2
1 Answers
4
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 commandnpm i packageName --save
ornpm i packageName --save --dev
. This will install as well as Update yourpackage.json
file too.

Pardeep Jain
- 84,110
- 37
- 165
- 215
-
Forgot to mention, will it change my other dependencies? like ```some package``` was '1.0.0' and will it change it to '^1.0.0'. I just need to avoid it – Massaget Oct 31 '19 at 06:21
-
I think if you run only `npm i` then it will not update your file, untill you run `npm i --save`, not sure though – Pardeep Jain Oct 31 '19 at 06:26