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.

bash: create-react-app: command not found

See original GitHub issue

Can you reproduce the problem with latest npm?

I have had alot of problems getting npm installed overall and spent around 6 hours getting to the point where I think it is installed now. I run npm -v and get a number, likewise for node.

All packages were working and I had to update to use your package. I could not, so deleted with all packages and tried to reinstall new version. After regular way failed I was able to get it installed, node and Npm, with homebrew after I made a few permissions changes (with difficulty).

Description

I’ve tried several different ways of getting this to work but I always get the error above. This is what I got when I installed the package- `sudo npm install -g create-react-app (I also tried non-sudo)

/Users/name/.npm-packages/bin/create-react-app -> /Users/name/.npm-packages/lib/node_modules/create-react-app/index.js /Users/name/.npm-packages/lib`

I looked in the the node_modules and the package is there. I’ve added this-

export PATH="./node_modules/.bin:$PATH" and also I tried it with the full path. It did not work.

I am not great with bash_profile, permissions, etc. so I can’t figure out what I need to do. If this is a node problem I apologize but I still need help regardless.

Run these commands in the project folder and fill in their results:

  1. npm ls react-scripts - npm ERR! code 1 -bash: /Users/name/Desktop/code_work/react_lynda/bulletin_board: is a directory
  2. node -v: - 7.2.0
  3. npm -v: -3.10.9

Then, specify:

  1. Operating system: IOS
  2. Browser and version: Chrome

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:16 (6 by maintainers)

github_iconTop GitHub Comments

7reactions
chrisdel101commented, Dec 13, 2016

The problem was not with CRA, but with node/npm.

Installing Node from scratch, non-homebrew, I put these in my bash_profile. And it worked.

export PATH="/usr/local/bin:$PATH"

export PATH=$PATH:/Users/my_name/.npm-packages/bin/

1reaction
gaearoncommented, Dec 6, 2016

Hi! The log you posted says it got installed to /Users/name/.npm-packages/bin/. Could you add that directory to PATH? I’m not sure where ./node_modules/.bin is coming from and I don’t think you need it there.

Read more comments on GitHub >

github_iconTop Results From Across the Web

create-react-app, installation error ("command not found")
Step # 1:- Make sure, Node js and React js is installed globally. You can check Nodejs by node --version . If not...
Read more >
create-react-app: command not found (React) error [Solved]
Use `npx` to solve the error create-react-app: command not found, e.g. `npx create-react-app my-app` or install the package globally by running `npm install ......
Read more >
npx create-react-app is not working · Issue #10132 - GitHub
First, you'll need to uninstall "create-react-app" using the "npm uninstall -g create-react-app" command. Run "npx create-react-app my-app" each ...
Read more >
How to Solve the 'create-react-app command not found' Error
The 'create-react-app command not found' error occurs because we're trying to run it locally when it's not installed.
Read more >
npm WARN exec - package was not found: create-react-app
Then you might be wondering what the problem is. It means that the package create-react-app is not installed, or at least not available...
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