Skip to content
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

Command not found create-react-app on ubuntu #5156

Closed
denniscual opened this issue Jan 4, 2018 · 16 comments
Closed

Command not found create-react-app on ubuntu #5156

denniscual opened this issue Jan 4, 2018 · 16 comments
Assignees
Labels

Comments

@denniscual
Copy link

denniscual commented Jan 4, 2018

Version of yarn
v1.3.2

Do you want to request a feature or report a bug?
bug

What is the current behavior?
creact-react-app command not found

If the current behavior is a bug, please provide the steps to reproduce.
yarn global add create-react-app
yarn global v1.3.2
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Installed "create-react-app@1.4.3" with binaries:
- create-react-app
Done in 3.05s.

which create-react-app
create-react-app command not found

Try to add the yarn global bin path to my global path. It is also not working.
My global path - export PATH=$PATH:~/.yarn/bin

Try to check if the create-react-app is included on the the yarn global dir. It is included.
But when I checked the bin folder, the create-react-app script is not exist. Other scripts are exist.

What is the expected behavior?
create-react-app should work.

Please mention your node.js, yarn and operating system version.
node - v9.3.0
yarn - v1.3.2
ubuntu - 16.04
shell - zsh

@ghost ghost assigned torifat Jan 4, 2018
@ghost ghost added the triaged label Jan 4, 2018
@jefer94
Copy link

jefer94 commented Jan 4, 2018

Please can you show me the out of this commands

ls .config/yarn/global/node_modules/.bin
./.config/yarn/global/node_modules/.bin/create-react-app
ls .yarn/global/node_modules/.bin
./.yarn/global/node_modules/.bin/create-react-app

@denniscual
Copy link
Author

denniscual commented Jan 5, 2018

When I try to execute this command ls .config/yarn/global/node_modules/.bin
the create-react-app package is exist.

But on this command ls .yarn/global/node_modules/.bin
global dir is not exist. All my packages installed as global are on the directory of .yarn/bin. But create-react-app is not stored on the bin dir. I can access the scripts which are on the .yarn/bin.

@jefer94
Copy link

jefer94 commented Jan 6, 2018

@jefer94
Copy link

jefer94 commented Jan 6, 2018

yarn global add create-react-app

@denniscual
Copy link
Author

I also tried to add the path of .yarn/bin to my shell config but its not working. The issue here is when I installed the create-react-app, the shell script is not included on the .yarn/bin. But it is included on the yarn global dir. Its pretty weird because I noticed that this bug is produced only in create-react-app package.

@jefer94
Copy link

jefer94 commented Jan 9, 2018

How is your shell?

@jefer94
Copy link

jefer94 commented Jan 9, 2018

Send me the output of create-react-app

@denniscual
Copy link
Author

yarn global add create-react-app
yarn global v1.3.2
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Installed "create-react-app@1.4.3" with binaries:
- create-react-app
Done in 3.05s.

which create-react-app
create-react-app command not found

When I tried to install using npm global its working. I know that this issue is old but I thought that it is fix now. Im using zsh shell .

@jefer94
Copy link

jefer94 commented Jan 9, 2018

https://stackoverflow.com/questions/11530090/adding-a-new-entry-to-the-path-variable-in-zsh

vim ~/.zshrc
export PATH=~/.yarn/bin:$PATH

:wq

@jefer94
Copy link

jefer94 commented Jan 9, 2018

~/.yarn/bin/create-react-app

@denniscual
Copy link
Author

denniscual commented Jan 9, 2018

Thanks for the help but I already add the the path of yarn/bin on my global path. The problem is when I try to install the create-react-app, the create-react-app script is not exist on the yarn/bin dir. But others packages which I installed using yarn are included on the yarn/bin dir. What I know is that the create-react-app must be included on the yarn/bin when installing the package.

@jefer94
Copy link

jefer94 commented Jan 9, 2018

Then your not have your yarn directory in the path, when your will have the full path to create react app, I help you.

Example: /usr/bin/uname -a

@denniscual
Copy link
Author

hi @jefer94 , Im sorry I dont understand. Would you elaborate for me your last comment?

@jefer94
Copy link

jefer94 commented Jan 13, 2018

Yes dude.

@torifat
Copy link
Member

torifat commented Feb 12, 2018

If you read carefully then you will see after installing Yarn it tells you to add the following thing in your path.

export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"

~/.yarn/bin is for yarn binaries only.

@torifat torifat closed this as completed Feb 12, 2018
@brcmesquita
Copy link

If you read carefully then you will see after installing Yarn it tells you to add the following thing in your path.

export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"

~/.yarn/bin is for yarn binaries only.

It works for me! Thank you a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants