PS E:\test> npm install <packagename> --save -dev
Says --dev option is depreacated use --only=dev
npm WARN install Usage of the --dev option is deprecated. Use --only=dev instead.
When I change my call to npm as shown below
PS E:\test> npm install <packagename> --only=dev
I get the following error
-- (empty)
npm ERR! code
How can I debug this and know more about it ??
This is really an interesting situation. Indeed you made a typo. Instead of writing --save-dev
you wrote --save -dev
. There is already a --dev
argument which can be used in order to install only the development dependencies that are defined in your package.json. Probably the parser thinks that you wanted to type --dev
instead of -dev
so it gives you the deprecation warning. The --dev
is deprecated and is replaced by the --only=dev
argument. This only works for the entire package.json and not for a specific package. So the npm install <packagename> --only=dev
is kind of invalid.
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