Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

npm uninstalls required dependencies #20694

Open
1 of 14 tasks
ckotzbauer opened this issue May 21, 2018 · 3 comments
Open
1 of 14 tasks

npm uninstalls required dependencies #20694

ckotzbauer opened this issue May 21, 2018 · 3 comments

Comments

@ckotzbauer
Copy link

ckotzbauer commented May 21, 2018

I'm opening this issue because:

  • npm is crashing.
  • npm is producing an incorrect install.
  • npm is doing something I don't understand.
  • npm is producing incorrect or undesirable behavior.
  • Other (see below for feature requests):

What's going wrong?

  • Dependencies are removed after making updates of other deps

How can the CLI team reproduce the problem?

  • Given I have a clean installation of this project.
  • I run npm i stylelint@9.2.1 -D to update this dependency. This seems to be fine.
  • I run npm i webpack@4.8.3 -D to update this dependency too. The update is done, but stylelint is removed (not listed in package-lock.json anymore; warning are shown in the cli, cause of unresolved peer-dependencies)

supporting information:

  • npm -v prints: 5.6.0 (included with node), 5.10.0 (globally), 6.0.1 (globally)
  • node -v prints: 10.1.0
  • npm config get registry prints: https://registry.npmjs.org/
  • Windows, OS X/macOS, or Linux?: Ubuntu 18.04
  • Network issues:
    • Geographic location where npm was run:
    • I use a proxy to connect to the npm registry.
    • I use a proxy to connect to the web.
    • I use a proxy when downloading Git repos.
    • I access the npm registry via a VPN
    • I don't use a proxy, but have limited or unreliable internet access.
  • Container:
    • I develop using Vagrant on Windows.
    • I develop using Vagrant on OS X or Linux.
    • I develop / deploy using Docker.
    • I deploy to a PaaS (Triton, Heroku).

Thanks for your investigation!

@seanrmilligan
Copy link

I was having similar issues in an Angular project. I had npm@5.6.0 installed because that's what is getting shipped with node.js, still.

Per issue 1739, it was fixed at npm@5.7.1.

Can you ensure that when you run npm install [package] it's being executed with 5.10.0 or 6.0.1 rather than 5.6.0?

@ckotzbauer
Copy link
Author

I'm relatively sure, that the correct version was used. But I can verify this again when I'm back from vacation in a few days.

@ckotzbauer
Copy link
Author

@seanrmilligan Verified with clean installations with npm 5.6 and 6.1

$ npm -v
5.6.0

$ npm i stylelint@9.2.1 -D
npm WARN @webpack-contrib/config-loader@1.1.1 requires a peer of chalk@^2.1.0 but none is installed. You must install peer dependencies yourself.
npm WARN postcss-html@0.23.7 requires a peer of postcss-syntax@^0.10.0 but none is installed. You must install peer dependencies yourself.
npm WARN postcss-markdown@0.23.7 requires a peer of postcss-syntax@^0.10.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

+ stylelint@9.2.1
added 13 packages, removed 39 packages, updated 57 packages and moved 1 package in 13.659s

$ npm i webpack@4.8.3 -D
npm WARN @webpack-contrib/config-loader@1.1.1 requires a peer of chalk@^2.1.0 but none is installed. You must install peer dependencies yourself.
npm WARN stylelint-config-recommended@2.1.0 requires a peer of stylelint@^8.3.0 || ^9.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN stylelint-config-standard@18.2.0 requires a peer of stylelint@^8.3.0 || ^9.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

+ webpack@4.8.3
added 3 packages, removed 187 packages, updated 18 packages and moved 1 package in 23.041s
$ sudo npm -v
6.1.0

$ sudo npm i stylelint@9.2.1 -D
npm WARN @webpack-contrib/config-loader@1.1.1 requires a peer of chalk@^2.1.0 but none is installed. You must install peer dependencies yourself.
npm WARN postcss-markdown@0.23.7 requires a peer of postcss-syntax@^0.10.0 but none is installed. You must install peer dependencies yourself.
npm WARN postcss-html@0.23.7 requires a peer of postcss-syntax@^0.10.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

+ stylelint@9.2.1
added 13 packages from 6 contributors, removed 39 packages, updated 57 packages and moved 1 package in 43.064s

$ npm i webpack@4.8.3 -D
npm WARN rm not removing node_modules/.bin/webpack as it wasn't installed by  node_modules/webpack
npm WARN @webpack-contrib/config-loader@1.1.1 requires a peer of chalk@^2.1.0 but none is installed. You must install peer dependencies yourself.
npm WARN stylelint-config-recommended@2.1.0 requires a peer of stylelint@^8.3.0 || ^9.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN stylelint-config-standard@18.2.0 requires a peer of stylelint@^8.3.0 || ^9.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

+ webpack@4.8.3
added 3 packages from 3 contributors, removed 187 packages, updated 18 packages and moved 1 package in 56.632s

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants