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

[rush] pnpm 3.5.3 + rush 5.9.1 rush update fails to link #1347

Closed
calebmshafer opened this issue Jun 29, 2019 · 17 comments
Closed

[rush] pnpm 3.5.3 + rush 5.9.1 rush update fails to link #1347

calebmshafer opened this issue Jun 29, 2019 · 17 comments
Assignees
Labels
bug Something isn't working as intended repro confirmed The issue comments included repro instructions, and the maintainers reproduced the problem

Comments

@calebmshafer
Copy link

During the move to pnpm 3.5.3 and rush 5.9.1, I deleted the shrinkwrap file and ran a rush update --full --purge. It successfully makes it through the pnpm install step but fails during the linking phase and receive this error,

ERROR: Internal Error: Cannot find installed dependency "@microsoft/api-extractor" in "C:\dev\imodeljs\imodeljs\common\temp\node_modules\.local\C%3A%2Fdev%2Fimodeljs%2Fimodeljs%2Fcommon%2Ftemp%2Fprojects%2Fbuild-tools.tgz\node_modules"
You have encountered a software defect. Please consider reporting the issue to the maintainers of this application.

The actual file path that exists in the .local folder for the package is, "C:\dev\imodeljs\imodeljs\common\temp\node_modules\.local\C%3A%2Fdev%2Fimodeljs%2Fimodeljs%2Fcommon%2Ftemp%2Fprojects%2Fbuild-tools.tgz_2a665c89609864b4e75bc5365d7f8f56".

It looks like this may be related to how pnpm resolves peer dependencies, https://pnpm.js.org/docs/en/how-peers-are-resolved.html, but that's just a guess based on some of the other paths in the .local folder,

"C:\dev\imodeljs\imodeljs\common\temp\node_modules\.local\C%3A%2Fdev%2Fimodeljs%2Fimodeljs%2Fcommon%2Ftemp%2Fprojects%[email protected]"
"C:\dev\imodeljs\imodeljs\common\temp\node_modules\.local\C%3A%2Fdev%2Fimodeljs%2Fimodeljs%2Fcommon%2Ftemp%2Fprojects%[email protected]"

If you'd like to reproduce the issue, the iModel.js repo when updated to use the new rush and pnpm versions will work. I can always make a separate repro repo if needed with the updated versions.

@sachinjoseph
Copy link
Member

Thanks @calebmshafer. It will help if you can provide repro repo and repro steps with the latest version of Rush.

@sachinjoseph
Copy link
Member

pnpm 3.5.3 is known to be incompatible with Rush version <= 5.9.1.

@calebmshafer
Copy link
Author

Just setup the repro repo here, https://github.com/calebmshafer/imodeljs_rush_bug_repro.

The steps are,

  1. Delete common\config\rush\shrinkwrap.yaml
  2. Run node common\scripts\install-run-rush.js update

Then you should see the error pasted above.

@calebmshafer
Copy link
Author

FWIW, I can reproduce this with Rush 5.10.0 as well.

I have been following #1142, as we've been experiencing the same issue, and with the fix pushed I attempted to update to the latest pnpm and Rush. That's when I discovered this problem.

@sachinjoseph
Copy link
Member

I can repro this on Rush 5.10.0 and pnpm 3.5.3. Looking into this.

@sachinjoseph sachinjoseph self-assigned this Jul 1, 2019
@sachinjoseph sachinjoseph added the bug Something isn't working as intended label Jul 1, 2019
@kelseyyoung
Copy link

I think I've seen this; I believe it's because you're missing peer dependencies in your package.json required by a different package you depend on

So for example in your second text block you probably need to depend on jsdom because another package you require has a peer dependency on it

@sachinjoseph sachinjoseph added the repro confirmed The issue comments included repro instructions, and the maintainers reproduced the problem label Jul 2, 2019
@agrittmsft
Copy link

Seems to not be an issue if you use Rush 5.10.0 and pnpm 2.25.6.

@cortopy
Copy link

cortopy commented Jul 8, 2019

Same error here with a different package. I've tried patching the dependency by moving the peer dependency into a proper dependency, but issue persists.
Using pnpm 2.25.6 also works for me

@calebmshafer
Copy link
Author

calebmshafer commented Jul 8, 2019

It works with pnpm 2.25.7 as well, that's the version we're currently stuck on. I haven't tracked down all of the peer dependencies and promoted them to real dependencies but I can see if that works.

@sachinjoseph
Copy link
Member

#1367

@apostolisms
Copy link
Contributor

@calebmshafer this should be fixed now in version 5.10.1

@calebmshafer
Copy link
Author

I can confirm it fixes the issue with installing. Thanks!

Hitting a slightly different issue now but I will open a new bug for it.

@alex-shamshurin
Copy link

The same is with latest rush 5.15.1 and pnpm 4.0.2

@maneetgoyal
Copy link

This issue seems to be back in pnpm 6.0.2

@robertkibet
Copy link

This issue seems to be back in pnpm 6.0.2

@maneetgoyal I would suggest you change to pnpm version 5.7.0 which worked for me. I was on the same version as yours v6.0.2 and encountered a similar linking problem, but it worked with v5.7.0 finally. 👍

@maneetgoyal
Copy link

Thanks @robertkibet, it worked with pnpm v5.18.9 too

ApolloTang added a commit to ApolloTang/study--test-drive-microsoft-rush that referenced this issue Apr 18, 2021
@ApolloTang
Copy link

in #2764, it said it is recently fixed by v5.47.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working as intended repro confirmed The issue comments included repro instructions, and the maintainers reproduced the problem
Projects
Archived in project
Development

No branches or pull requests

10 participants