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] support pnpm auto-install-peers #3356

Open
unional opened this issue Apr 17, 2022 · 5 comments
Open

[rush] support pnpm auto-install-peers #3356

unional opened this issue Apr 17, 2022 · 5 comments

Comments

@unional
Copy link

unional commented Apr 17, 2022

Summary

pnpm supports auto-install-peers, which will make it much less painful when installing dependency when strictPeerDependencies is turned on.

pnpm/pnpm#3995 (reply in thread)

Repro steps

Currently adding dependencies with peerDependencies is a manual drill down process:

  • install it, see the missing dependency errors
  • install the missing dependency, rinse and repeat

Tried adding auto-install-peers=true to .npmrc doesn't turn that on when using rust.

Details

To fix this, either let pnpm reads .npmrc or add autoInstallPeers to pnpmOptions in rush.json:

{
  "pnpmOptions": {
    "autoInstallPeers": true
  }
}

Standard questions

Please answer these questions to help us investigate your issue more quickly:

Question Answer
@microsoft/rush globally installed version? 5.66.2
rushVersion from rush.json? 5.66.2
useWorkspaces from rush.json? yes
Operating system? Windows
Would you consider contributing a PR? No
Node.js version (node -v)? 16.14.2
pnpm version? 6.32.8
@openHacking
Copy link

I need this too.thanks.

@bkoplin
Copy link

bkoplin commented Jun 18, 2022

Likewise

@dreamworkers
Copy link

Please consider this 🙏

@cweekly
Copy link

cweekly commented Oct 25, 2022

I like the idea of rush.json pnpmOptions.autoInstallPeers, but as of pnpm v7.1.3, setting "auto-install-peers=true" in the top-level (common/config/rush/) .npmrc file seems to do the trick:

OS: Win10
Node: v16.18.0
Rush v5.70.0
PNPM v7.13.6

rush.json:
 ...
  "rushVersion": "5.70.0",
  "pnpmVersion": "7.13.6",
  "pnpmOptions": {
    "pnpmStore": "local",
    "strictPeerDependencies": true,
    "resolutionStrategy": "fast",
    "preventManualShrinkwrapChanges": false,
    "useWorkspaces": true
  },
  ...  
  
common/config/rush/.npmrc:
...
auto-install-peers=true
...  

@kenrick95
Copy link
Contributor

Seems resolved in #4379

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Low priority
Development

No branches or pull requests

6 participants