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

[BUG] npm 7.10 does not recursively install modules in local filesystem #3100

Closed
andreash opened this issue Apr 19, 2021 · 6 comments
Closed
Labels
Bug thing that needs fixing Duplicate duplicate of another, existing issue Release 7.x work is associated with a specific npm 7 release

Comments

@andreash
Copy link

Current Behavior:

I have


    +- main_project  
    |  +-package.json
    +- packages
       +- package1
          +-package.json

In package1 as cwd I do npm install express and then rm -rf node_modules and rm package-lock.json. Then, in main_project as cwd I do npm install. The express module does not get installed in package1 with npm 7.10. If I use npm 6.14.12 everything is fine and npm installs recursively and express and its dependencies show up in the node_modules subdirectory of package1.

Expected Behavior:

I expect npm 7.10 to behave the same way as npm 6.14.12

Steps To Reproduce:

See steps above and zip attached - pretty simple.

Environment:

  • OS: Ubuntu 20.04
  • Node: v14.16.1 with npm 7.10 and v12.22.1 with npm 6.14.12
  • npm: 7.10 / 6.14.12

npm_7.0-test.zip

@andreash andreash added Bug thing that needs fixing Needs Triage needs review for next steps Release 7.x work is associated with a specific npm 7 release labels Apr 19, 2021
@tangkunyin
Copy link

tangkunyin commented Apr 19, 2021

I'm experiencing this same issue:sindresorhus/gulp-imagemin#338

@andreash
Copy link
Author

I'm experiencing this same issue:sindresorhus/gulp-imagemin#338

Did you find a solution?

@tangkunyin
Copy link

I'm experiencing this same issue:sindresorhus/gulp-imagemin#338

Did you find a solution?

@andreash Downgrade npm to 6x or use yarn instead.

@andreash
Copy link
Author

Yeah, that's what I am doing (user npm 6.x). Yarn doesn't work for me for other reasons. But I still see this as a bug in npm 7.

@ath0mas
Copy link

ath0mas commented Apr 24, 2021

Seems duplicate of #2339 (and #3028): npm 7 issue with transient dependencies for local path deps (referenced through file:)

@darcyclarke
Copy link
Contributor

v7 doesn't install package's dependencies that are outside of the root (ie. any package defined as ../... isn't going to get it's dependencies reified) - this is indeed a duplicate

@darcyclarke darcyclarke added Duplicate duplicate of another, existing issue and removed Needs Triage needs review for next steps labels Jun 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug thing that needs fixing Duplicate duplicate of another, existing issue Release 7.x work is associated with a specific npm 7 release
Projects
None yet
Development

No branches or pull requests

4 participants