0
votes

I can't get react work on Ubuntu, I just get command not found, can't fix it.

npm install -g create-react-app
/home/name/.npm-global/bin/create-react-app -> /home/name/.npm-global/lib/node_modules/create-react-app/index.js + [email protected] updated 1 package in 4.61s

after that I enter:

create-react-app app
zsh: command not found: create-react-app

.zshrc file

export PATH=$HOME/.node_modules_global/bin:$PATH

I understand that obviously is in path problem, but I can't figure it out, I have some experience with Linux, but I just can't fix this and to get react work.

Thanks.

Ubuntu 17.04 node v8.4.0 npm v5.3.0

Thank you.

1

1 Answers

3
votes

Seems to me that you need to add ~/.npm-global/bin/ to your $PATH:

export PATH=~/.npm-global/bin/:$HOME/.node_modules_global/bin:$PATH