-
-
Notifications
You must be signed in to change notification settings - Fork 26.8k
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
yarn global add create-react-app doesn’t work with nvm #1118
Comments
Works for me:
Can you specify more details? |
I installed yarn using npm. How did you install yarn?
I installed node using nvm. I'm using node 4.5.
…On Wed, 30 Nov 2016 at 23:24 Dan Abramov ***@***.***> wrote:
Works for me:
***@***.*** ~> yarn global add create-react-app
Using globally installed version of Yarn
yarn global v0.17.8
warning No license field
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
[4/4] 📃 Building fresh packages...
success Installed ***@***.*** with binaries:
- create-react-app
warning No license field
✨ Done in 2.99s.
***@***.*** ~> create-react-app ~/p/hmmm
Creating a new React app in /Users/gaearon/p/hmmm.
Installing packages. This might take a couple minutes.
Installing react-scripts from npm...
Can you specify more details?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1118 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAJ5zNVlUQbPEgCcSuaDn8EuVA-8kvV3ks5rDYcQgaJpZM4K_zbg>
.
|
I'm using a FB laptop so it's preinstalled here. I'll try again at home. |
I was able to repro this... Initial setup: Switched to node 4 via nvm,
@stevensacks this at all similar to your situation? If you do a global remove, then global add, does it work? Likely related to yarnpkg/yarn#1151 (comment)? |
perhaps try installing with brew, as per this guide? |
Installing via brew is strongly recommended against.
…On Thu, 1 Dec 2016 at 9:34 Dan Minshew ***@***.***> wrote:
perhaps try installing with brew, as per this guide
<https://yarnpkg.com/en/docs/install>?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1118 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAJ5zLQXAHhoJusgEDzhc1EqboLcNXccks5rDhYMgaJpZM4K_zbg>
.
|
Maybe I can't reproduce because I'm using n instead of nvm. |
@stevensacks why would be not recommended to use brew? |
I can reproduce this as well. Installed Yarn via npm and node via npm. Also doesn't work for node installed via brew. |
Likely yarnpkg/yarn#1151, we need to wait for this to be fixed on Yarn side. |
This solved it for me (on Ubuntu 16.04) |
Hi, so this looks like a chain of crappy bugs cluster-munging together... For me I think it's the result of using NVM and Yarn together which might be confusing Yarn a little. I deleted my yarn (I'm on Ubuntu on this laptop) and reinstalled using "don't give me extra things"
Then found that Yarn may not fix this for NVM anytime soon but this NPM utility shortcuts the manual file linking: https://www.npmjs.com/package/fix-yarn-global-packages (not my tool, just just found it looking around) I then tested location using This: |
At the request of @gaearon:
https://yarnpkg.com/en/docs/cli/global
The official Yarn documentation states that you can install (and maintain) your create-react-app project with yarn. However, it doesn't actually work. Calling
create-react-app
after a global yarn install does nothing. CRA currently only works from a global npm install.It would be great if yarn and CRA went together like chocolate and peanut butter.
The text was updated successfully, but these errors were encountered: