You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] Installing git dependencies that share dependencies with the parent package fails #2106
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! > grommet-styleguide@2.0.2 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
Activity
pacote@11.1.13