question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

yarn global add create-react-app doesn’t work with nvm

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:3
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

11reactions
zegilooocommented, Oct 14, 2017

This solved it for me (on Ubuntu 16.04) export PATH=$PATH:~/.yarn/bin

3reactions
gaearoncommented, Nov 30, 2016

Works for me:

gaearon@gaearon-mbp ~> 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 create-react-app@0.6.0 with binaries:
      - create-react-app
warning No license field
✨  Done in 2.99s.

gaearon@gaearon-mbp ~> 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?

Read more comments on GitHub >

github_iconTop Results From Across the Web

create-react-app is not working since version 4.0.1
I upgraded to the latest stable node version 15.3.0 via nvm. nvm install node. Then I installed create-react-app again (no global flag). npm ......
Read more >
Dev > Linux > Create-React-App. {NVM, Node, NPM ... - Medium
Yarn will often not detect NVM global directories when different versions of node are installed. Ensure NPM and Yarn are using the same ......
Read more >
What To Do if create-react-app Doesn't Work
1. npm uninstall -g create-react-app. This is the npm command to uninstall your global installation of create-react-app . · 2. yarn global remove ......
Read more >
Working with Yarn Global Commands | by Keerti Kotaru
This article details using Yarn to install tools or packages at the global level. With Yarn, all global commands need to start with...
Read more >
Getting Started - Create React App
If you've previously installed create-react-app globally via npm install ... -g create-react-app or yarn global remove create-react-app to ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found