I'm a complete beginner at Node so maybe my question is probably very naive, sorry about that.
I created my first project at work with Grunt.
Grunt uses Node, so now I have a nice folder node_modules
at the root of my project, with several modules inside. Everything is working fine.
I added node_modules/*
in my .gitignore
, assuming that I would rebuild it easily from another place.
Then I go home, I retrieve my project with git and now I don't know how to rebuild the node modules.
Is there an npm
command that would read package.json
?
The npm-rebuild command will run npm build command on the matched folders. This command is particularly useful when you install a new version of node, and you have to recompile all your C++ addons with the new binary. This command opens a package repository page in the browser.
There are two ways to clean up the node_modules folder: Delete the folder and reinstall. Use npm prune (starting with npm version 6)
Try npm i
, a short version of npm install
inside your directory where package.json
exists.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With