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] Installing git dependencies that share dependencies with the parent package fails #2106

Closed
aredridel opened this issue Nov 2, 2020 · 0 comments
Labels
Bug thing that needs fixing Needs Triage needs review for next steps Release 7.x work is associated with a specific npm 7 release

Comments

@aredridel
Copy link
Contributor

aredridel commented Nov 2, 2020

ehavior:

In our main repo, grommet-styleguide is a git dependency. It depends on systemjs, as does the parent package.

With npm 7, that dependency is not where it can be found by the prepare script in grommet-styleguide.

npm ERR! code 1
npm ERR! git dep preparation failed
npm ERR! command /usr/local/Cellar/node/15.0.1/bin/node /usr/local/lib/node_modules/npm/bin/npm-cli.js install --only=dev --prod --ignore-prepublish --no-progress --no-save --cache=/Users/aria/.npm/_cacache --prefer-offline=false --prefer-online=false --offline=false --before=
npm ERR! > [email protected] prepare
npm ERR! > cp -a node_modules/systemjs/dist/ public/vendor/systemjs && npm run postcss && npm run rollup
npm ERR! npm WARN invalid config before="" set in command line options
npm ERR! npm WARN invalid config Must be one of: null, valid Date string
npm ERR! cp: node_modules/systemjs/dist/: No such file or directory
npm ERR! npm ERR! code 1
npm ERR! npm ERR! path /Users/aria/.npm/_cacache/tmp/git-clone-2db8d5b0
npm ERR! npm ERR! command failed
npm ERR! npm ERR! command sh -c cp -a node_modules/systemjs/dist/ public/vendor/systemjs && npm run postcss && npm run rollup
npm ERR! 
npm ERR! npm ERR! A complete log of this run can be found in:
npm ERR! npm ERR!     /Users/aria/.npm/_cacache/_logs/2020-11-02T15_42_36_044Z-debug.log

Expected Behavior:

When installing with npm 6, this works, and grommet-styleguide has access to systemjs when the prepare script is run, and the build completes without error.

Steps To Reproduce:

git init npm-7-bug-1
git init npm-7-bug-2
cd npm-7-bug-1
npm init --yes
npm install systemjs
jq .scripts.prepare='"cat node_modules/systemjs/dist/s.js"'  package.json > new
mv new package.json 
git add package.json
git commit -m 'test'
rm -r node_modules
cd ../npm-7-bug-2
npm init --yes
npm install systemjs
npm i ../npm-7-bug-1

Environment:

  • OS: MacOS 15
  • Node: 15.0.1
  • npm: 7.0.3
@aredridel aredridel 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 Nov 2, 2020
@isaacs isaacs closed this as completed in 1dad328 Nov 6, 2020
@darcyclarke darcyclarke added this to the OSS - Sprint 19 milestone Nov 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug thing that needs fixing Needs Triage needs review for next steps Release 7.x work is associated with a specific npm 7 release
Projects
None yet
Development

No branches or pull requests

2 participants