1

I have installed nodejs and yarn on my computer (Linux Deepin). I have also installed create-react-app globally. However, the create-react-app command is not running. I keep getting the error: bash: create-react-app: command not found.

Is there some configuration I am missing? Because I have seen the create-react-app that was installed globally.

NodeJS - v6.3.1 Yarn - 1.6.0 OS version Linux Deepin -15

2
  • If it is installed globaly then it should work.Please share the command used to install it globally Commented May 21, 2018 at 9:55
  • yarn global add create-react-app Commented May 21, 2018 at 9:58

2 Answers 2

2

Add yarn global path to your path variable the following appends yarn global path to your ~/.bashrc

 echo  'export PATH="$PATH:$(yarn global bin)"' >> ~/.bashrc 

if you are using other shell like zsh make sure you append to the correct file for zsh use

 echo  'export PATH="$PATH:$(yarn global bin)"' >> ~/.zshrc

finally make sure you restart your terminal.

Sign up to request clarification or add additional context in comments.

1 Comment

running the command above and runing create-react-app i got this error: /usr/bin/env: ‘node’: No such file or directory
0

Are you sure the command is already in your path?? If you just installed it, maybe, just close and relaunch terminal ;)

2 Comments

I dont know. I am new to linux. Trying to find that out on google. Can you show me?
you could check @Mehari answer, it is pretty much what I was about to explain :D

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.