create-react-app icon indicating copy to clipboard operation
create-react-app copied to clipboard

npm i -g create-react-app not working

Open barbalex opened this issue 9 years ago • 9 comments

Is this a bug report?

yes

Can you also reproduce the problem with npm 4.x?

Sort of: it does not work either but with different error message:

npm i -g create-react-app
npm ERR! addLocal Could not install C:\Users\alex\create-react-app
npm ERR! No name provided in package.json

Which terms did you search for in User Guide?

Scanned it and found nothing relevant to this problem.

Environment

  1. node -v: 4.6.1 and 5.5.1
  2. npm -v: 8.9.0
  3. yarn --version (if you use Yarn): 1.2.1 (installation works using: yarn global add create-react-app)
  4. npm ls react-scripts (if you haven’t ejected): not relevant as I am trying to install globally

Then, specify:

  1. Operating system: Windows 10
  2. Browser and version (if relevant): not relevant

Steps to Reproduce

  1. open console
  2. npm i -g create-react-app

Expected Behavior

Installation works

Actual Behavior

npm i -g create-react-app
npm ERR! Can't install C:\Users\alex\create-react-app: Missing package name

Reproducible Demo

No idea how to make this reproducible :-(

barbalex avatar Nov 07 '17 14:11 barbalex

I need to add: I can install any other module globally, only create-react-app errors out. That is why I created the issue here and not on npm.

barbalex avatar Nov 07 '17 14:11 barbalex

Please try clearing your npm cache; if that doesn't work, please file a bug with npm.

Sorry we cannot be of more help!

Timer avatar Nov 07 '17 14:11 Timer

I tried a lot of stuff including:

  • uninstalling node, reinstalling
  • using other versions of npm
  • clearing npm cache

barbalex avatar Nov 07 '17 14:11 barbalex

Unfortunately, only npm will be able to help you with this.

As you can see, the package name is present: https://unpkg.com/[email protected]/package.json

And I cannot reproduce:

Timer avatar Nov 07 '17 14:11 Timer

Please make sure you don't have a npm proxy/mirror setup which may have a corrupted version of the package.

Timer avatar Nov 07 '17 14:11 Timer

please file a bug with npm.

Done: https://github.com/npm/npm/issues/19086

Thanks for helping.

barbalex avatar Nov 07 '17 15:11 barbalex

Quick fix here, I think probably as I had it installed from ages ago anyway: npm install -g create-react-app@latest (Does appear an npm bug)

peteobrien avatar Dec 03 '17 06:12 peteobrien

Thanx @peterobrien 👍

myounus96 avatar Jan 27 '18 08:01 myounus96

probem installing create-react-app

npm ERR! Refusing to delete C:\Users\EMBASH\AppData\Roaming\npm\create-react-app : node_modules/create-react-app/index.js symlink target is not controlled by npm C:\Users\EMBASH\AppData\Roaming\npm\node_modules\create-react-app npm ERR! File exists: C:\Users\EMBASH\AppData\Roaming\npm\create-react-app npm ERR! Move it away, and try again.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\EMBASH\AppData\Roaming\npm-cache_logs\2018-09-07T08_34_18 _292Z-debug.log

C:\Users\EMBASH>npm install create-react-app -g -f npm WARN using --force I sure hope you know what you are doing. npm ERR! path C:\Users\EMBASH\AppData\Roaming\npm\create-react-app npm ERR! code EEXIST npm ERR! Refusing to delete C:\Users\EMBASH\AppData\Roaming\npm\create-react-app : node_modules/create-react-app/index.js symlink target is not controlled by npm C:\Users\EMBASH\AppData\Roaming\npm\node_modules\create-react-app npm ERR! File exists: C:\Users\EMBASH\AppData\Roaming\npm\create-react-app npm ERR! Move it away, and try again.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\EMBASH\AppData\Roaming\npm-cache_logs\2018-09-07T08_36_39 _470Z-debug.log

embashgit avatar Sep 07 '18 08:09 embashgit