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

fix(react-native): fix pnpm module resolver #15956

Merged
merged 2 commits into from Mar 31, 2023

Conversation

Singloo
Copy link
Contributor

@Singloo Singloo commented Mar 29, 2023

Current Behavior

Pnpm resolver looks for the wrong package entry file.

Resolved path
.../node_modules/.pnpm/supports-color@5.5.0/node_modules/supports-color/index.js

Expected Behavior

Should look for the entry file for browser env.
.../node_modules/.pnpm/supports-color@5.5.0/node_modules/supports-color/browser.js

Add mainFields option solves this problem, option value respects the default value of metro resolverMainFields

Related Issue(s)

Fixes #15763 #9743

@vercel
Copy link

vercel bot commented Mar 29, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated
nx-dev ⬜️ Ignored (Inspect) Mar 31, 2023 at 2:55AM (UTC)

@Singloo Singloo force-pushed the bug-fix/fix-pnpm-module-resolver branch from 6ad0664 to e1da4be Compare March 29, 2023 11:13
@xiongemi xiongemi changed the title Bug fix/fix pnpm module resolver bugfix(react-native): fix pnpm module resolver Mar 31, 2023
@xiongemi xiongemi changed the title bugfix(react-native): fix pnpm module resolver fix(react-native): fix pnpm module resolver Mar 31, 2023
@xiongemi xiongemi merged commit a404595 into nrwl:master Mar 31, 2023
3 checks passed
@Singloo Singloo deleted the bug-fix/fix-pnpm-module-resolver branch April 1, 2023 06:32
@github-actions
Copy link

github-actions bot commented Apr 7, 2023

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

React Native, PNPM Cannot resolve OS
2 participants