Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

behavior of 'npm ls` #73

Closed
missinglink opened this issue Jul 12, 2016 · 4 comments
Closed

behavior of 'npm ls` #73

missinglink opened this issue Jul 12, 2016 · 4 comments

Comments

@missinglink
Copy link

missinglink commented Jul 12, 2016

heya, more of a question than a bug report..

I have been getting infuriated with the validate step recently as it always seems to complain about my modules, after looking over the code it seems the culprit is npm ls.

Now, this may only affect certain versions of node, I didn't have these issues in the past but at some point npm switched from nesting node_modules dirs to putting them all in one dir.

so when I run git commit it runs npm ls and then my commit fails, basically this:

$ rm -rf node_modules
$ npm cache clean
$ npm i
$ npm ls
... bunch of stuff followed by

├─┬ iso3166-1@0.2.8
│ └─┬ zlib-browserify@0.0.3
│   └── UNMET DEPENDENCY tape@~0.2.2

...

    │ ├── right-align@0.1.3
    │ └── wordwrap@0.0.2
    ├── decamelize@1.2.0
    └── window-size@0.1.0

npm ERR! missing: tape@~0.2.2, required by zlib-browserify@0.0.3

$ echo $?
1

surely I'm not the only one having this issue? how are you working around this?

$ node --version
v6.3.0

$ npm --version
3.10.3
@missinglink
Copy link
Author

missinglink commented Jul 12, 2016

ok, so this is an issue with npm@3+, if I do the following sudo npm i -g npm@2.15.8 then npm ls works as expected and responds exit 0

@nlf
Copy link
Owner

nlf commented Jul 12, 2016

interesting, you should open an issue on npm and see if they can figure out why it fails in npm@3

@missinglink
Copy link
Author

npm/npm#13352

@Trott
Copy link
Collaborator

Trott commented Jul 3, 2018

Bug does not seem to exist running with recent/current npm, but if I'm wrong about that, please comment or (if GitHub lets you) re-open the issue. Thanks!

@Trott Trott closed this as completed Jul 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants