The difference between these two, is that devDependencies are modules which are only required during development, while dependencies are modules which are also required at runtime.
To save a dependency as a devDependency on installation we need to do an npm install --save-dev, instead of just an npm install --save.
https://medium.com/@dylanavery720/npmmmm-1-dev-dependencies-dependencies-8931c2583b0c#:~:text=The%20difference%20between%20these%20two,an%20npm%20install%20%2D%2Dsave.
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (5)
Actually there are four types prod, dev, optional and no save.
Dear Krizna-99, kindly explain optional and no save.
If package is installed in optional dependency it will not produce error while npm install your project on other system and also it will not block your installation if anyone of the package didn't install properly.no save doesn't add your package to package.json
Okay. Thank you very much for the clarifications. Much appreciated.
Also peer and bundled