Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what is the purpose of "npm install package-name --no-save"?

I mean why would anyone install a package temporarily and not add it to the dependencies list ?

--no-save uses?

like image 956
Binbaker Avatar asked Dec 08 '25 08:12

Binbaker


1 Answers

Maybe you just want to test an idea without the need to add a package in the dependency or devDependencies of your package.json file.

if you run:

npm install --no-save express

now, if you check your node_modules folder the package is downloaded but package.json is not updated.

When you try to run your code, since express is available in node_module it can be picked up by your code or any third party library that you have in your project.

like image 111
Vahid Avatar answered Dec 09 '25 22:12

Vahid



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!