-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
Fixes Global Node Prefix Error #31740
Conversation
Base commit: d3c7e20 |
Base commit: d3c7e20 |
This was the only fix to get the newer RN versions building for me after multiple days of troubleshooting - highly recommended. |
Same here, worked for me. |
This makes sense to me. Can we update the comment to be a little more descriptive and less specific to nvm (taking into consideration other version managers)? |
I'm not sure what to add. You want me to take out |
Ah, I meant the comment in the code. Something along the lines of why we're unsetting |
Gotcha! I did the best I could with my limited understanding of Node 😂 let me know if that's confusing. I'll fix the conflicts as well. |
That looks great. Could you please rebase on main and resolve these conflicts and I'll get it imported. Thanks! |
ok @charlesbdudley looks like the original script was removed from |
I think something may have gone awry related to the repo switching the default branch from master to main since the time this PR was originally opened. You might be able to fix this by rebasing on top of main. For example, I'm not sure why |
Shoot. Ok, I'll figure it out. I made this PR with the Github GUI originally so I need to figure out how to rebase (new for me) on top of a new remote from a fork (also new for me) 😬 |
ok @charlesbdudley I think I got it |
@charlesbdudley has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
Did this get merged in? I can't tell what happened? |
Good call. Looks like @facebook-github-bot didn't mark this appropriately but it was merged into main here: 6334ac3 |
Summary: Some users have `node` installed globally which sets a `PREFIX` by default (so it knows where to put pkgs). We are looking for the "right" node on the next step anyway and if the user is using `nvm`, `PREFIX` breaks it. closes facebook#31181 ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://github.com/facebook/react-native/wiki/Changelog --> [General] [Fixed] - Ignores global npm prefix Pull Request resolved: facebook#31740 Test Plan: `yarn ios` now works, even if there's a `usr/local/bin/npm` <img width="493" alt="Screen Shot 2021-06-17 at 10 14 08 AM" src="https://user-images.githubusercontent.com/2659478/122413946-c2f57200-cf54-11eb-817c-bd3c07ac50bf.png"> Reviewed By: yungsters Differential Revision: D31237363 Pulled By: charlesbdudley fbshipit-source-id: 4ee9c04f8b8ab4e815bafbe2d02e589d621577b4
Summary: Some users have `node` installed globally which sets a `PREFIX` by default (so it knows where to put pkgs). We are looking for the "right" node on the next step anyway and if the user is using `nvm`, `PREFIX` breaks it. closes facebook#31181 ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://github.com/facebook/react-native/wiki/Changelog --> [General] [Fixed] - Ignores global npm prefix Pull Request resolved: facebook#31740 Test Plan: `yarn ios` now works, even if there's a `usr/local/bin/npm` <img width="493" alt="Screen Shot 2021-06-17 at 10 14 08 AM" src="https://user-images.githubusercontent.com/2659478/122413946-c2f57200-cf54-11eb-817c-bd3c07ac50bf.png"> Reviewed By: yungsters Differential Revision: D31237363 Pulled By: charlesbdudley fbshipit-source-id: 4ee9c04f8b8ab4e815bafbe2d02e589d621577b4
Summary: Some users have `node` installed globally which sets a `PREFIX` by default (so it knows where to put pkgs). We are looking for the "right" node on the next step anyway and if the user is using `nvm`, `PREFIX` breaks it. closes facebook#31181 ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://github.com/facebook/react-native/wiki/Changelog --> [General] [Fixed] - Ignores global npm prefix Pull Request resolved: facebook#31740 Test Plan: `yarn ios` now works, even if there's a `usr/local/bin/npm` <img width="493" alt="Screen Shot 2021-06-17 at 10 14 08 AM" src="https://user-images.githubusercontent.com/2659478/122413946-c2f57200-cf54-11eb-817c-bd3c07ac50bf.png"> Reviewed By: yungsters Differential Revision: D31237363 Pulled By: charlesbdudley fbshipit-source-id: 4ee9c04f8b8ab4e815bafbe2d02e589d621577b4
Summary
Some users have
node
installed globally which sets aPREFIX
by default (so it knows where to put pkgs). We are looking for the "right" node on the next step anyway and if the user is usingnvm
,PREFIX
breaks it.closes #31181
Changelog
[iOS] [Fixed] - Ignores global npm prefix
Test Plan
yarn ios
now works, even if there's ausr/local/bin/npm