Solving npm Usage of the --dev option is deprecated. Use --only=dev instead.
Problem:
You want to install development dependencies for a NodeJS package using
example.sh
npm install --dev
but you get this error message:
example.txt
npm WARN install Usage of the `--dev` option is deprecated. Use `--only=dev` instead.
Solution
You can use
example.sh
npm install # Install normal (not development) dependencies
npm install --only=dev # Install only development dependencies
instead. Note that npm install --only=dev
will only install development dependencies, so in most cases you want to run both commands.
Check out similar posts by category:
NodeJS
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow