rushstack icon indicating copy to clipboard operation
rushstack copied to clipboard

[rush] Dependencies do not match the current shrinkwrap

Open naissa12 opened this issue 3 years ago • 3 comments

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?

naissa12 avatar Mar 30 '22 23:03 naissa12

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.

dmichon-msft avatar Mar 31 '22 21:03 dmichon-msft

Deleting the pnpm-lock file worked for me.

appsparkler avatar May 28 '22 12:05 appsparkler

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.

octogonz avatar May 29 '22 03:05 octogonz

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

huangyingwen avatar Aug 08 '23 00:08 huangyingwen