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

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

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 16 (6 by maintainers)

Most upvoted comments

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/

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.