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

npm ls not listing duplicate webpack #19927

Open
1 of 13 tasks
penx opened this issue Feb 27, 2018 · 0 comments
Open
1 of 13 tasks

npm ls not listing duplicate webpack #19927

penx opened this issue Feb 27, 2018 · 0 comments
Labels

Comments

@penx
Copy link

penx commented Feb 27, 2018

I'm opening this issue because:

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

What's going wrong?

npm ls webpack is not correctly showing all installations of webpack, when 4 is installed as a package dependency and 3 is installed as a sub dependency.

I think this a bug with npm ls.

How can the CLI team reproduce the problem?

Start a new package as follows:

npm init -y
npm install @storybook/react@3.3.14 --save-dev
npm ls webpack

You should see the following output:

example-project@1.0.0
└─┬ @storybook/react@3.3.14
  └── webpack@3.11.0

This is correct, as @storybook/react has the following in dependencies:

"webpack": "^3.10.0", 

Then install a version of webpack that differs from the @storybook/react dependency:

npm install webpack@4 --save-dev
npm ls webpack

I would expect to get:

example-project@1.0.0
├─┬ @storybook/react@3.3.14
│ └─ webpack@3.11.0
└── webpack@4.0.1

But actually get:

example-project@1.0.0
└── webpack@4.0.1

However, example-project/node_modules/@storybook/react/node_modules/webpack does exist on disk, so the module is there but is missing from npm ls.

supporting information:

  • npm -v prints: 5.6.0
  • node -v prints: v8.9.3
  • npm config get registry prints: https://registry.npmjs.org/
  • Windows, OS X/macOS, or Linux?: OS X
  • 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).
@penx penx changed the title npm ls not listing duplicate webpack npm ls not listing duplicate webpack Feb 27, 2018
@kenany kenany added the npm5 label Feb 28, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants