[resolved] deprecated package message not shown installing deprecated packages as dev deps


(Roy Revelt) #1

What I Wanted to Do

I noticed npm is not showing “npm WARN deprecated” message when installing a deprecated packages as dev dependencies

What Happened Instead

I tried installing deprecated package as normal dependency — “npm WARN deprecated” message appeared… But not when installing the same package as dev dependency. I would expect that, independently which type a dependency is, a deprecation message should always be shown, right?

Reproduction Steps

For example, try installing email-remove-unused-css of mine as a dev dependency, it is a deprecated package. You probably won’t get a “deprecated” message.

Platform Info

$ npm --versions
{ npm: '6.4.1',
  ares: '1.15.0',
  cldr: '33.1',
  http_parser: '2.8.0',
  icu: '62.1',
  modules: '64',
  napi: '3',
  nghttp2: '1.34.0',
  node: '10.15.0',
  openssl: '1.1.0j',
  tz: '2018e',
  unicode: '11.0',
  uv: '1.23.2',
  v8: '',
  zlib: '1.2.11' }
$ node -p process.platform

(Lars Willighagen) #2
I am getting a deprecation warning on Linux.
$ mkdir 116
$ cd 116
116$ nano README
116$ npm ini -y
Wrote to /.../116/package.json:

  "name": "116",
  "version": "1.0.0",
  "description": "https://npm.community/t/deprecated-package-message-not-shown-installing-deprecated-packages-as-dev-deps/4491",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  "keywords": [],
  "author": "",
  "license": "ISC"

116$ npm i -D email-remove-unused-css
npm WARN deprecated email-remove-unused-css@4.7.0: Now renamed to email-comb, please use it instead

116$ node -p process.platform

(Roy Revelt) #3

Somebody on a Mac, please try on your machine

(Kat Marchán) #4

I can’t reproduce this either, on OSX.

(Roy Revelt) #5

thanks Kat! it’s something wrong my end then. Let’s close this issue. How do we close? I appended [resolved] to the title.

(Lars Willighagen) #6

Time for me to test my new modding powers, I guess! (yay)

Edit: was going to close the topic, but then I remembered there’s no real reason too. Also, you could probably have marked a reply as solution yourself too.