rushstack
rushstack copied to clipboard
[rush] Dependencies do not match the current shrinkwrap
I'm getting the following error when running rush update
The shrinkwrap file contains the following issues:
Dependencies of project "@test/animation" do not match the current shrinkwrap.
Checking installation in "/Users/test/dev/test/common/temp"
Deleting files from /Users/test/dev/test/common/temp/node_modules
Running "pnpm install" in /Users/test/dev/test/common/temp
The command failed:
/Users/test/dev/test/common/temp/pnpm-local/node_modules/.bin/pnpm install --store /Users/test/dev/test/common/temp/pnpm-store --no-prefer-frozen-lockfile --strict-peer-dependencies --recursive --link-workspace-packages false
ERROR: Error: The command failed with exit code 1
Has anyone run into this error before?
Verify that this file exists?
/Users/test/dev/test/common/temp/pnpm-local/node_modules/.bin/pnpm
If not, may need to use rush purge to clean up and then try again.
Deleting the pnpm-lock file worked for me.
If you have a branch saved that can reproduce the error, you can try manually running the CLI command above (i.e. invoking PNPM directly outside of Rush). The shell working directory should be common/temp. This sometimes helps to figure out why pnpm is crashing.
One known issue is if a package.json has a trailing comma in its JSON - for some reason this causes PNPM to fail with no error message.
In my case, stylelint was overridden in pnpm-config.json causing this problem
"globalOverrides": {
"stylelint": "^15.7.0"
},
Rush Multi-Project Build Tool 5.99.0 - https://rushjs.io Node.js version is 18.16.0 (LTS)
Trying to acquire lock for pnpm-7.33.0 Acquired lock for pnpm-7.33.0