Create-react-app: npm i -g create-react-app not working

Created on 7 Nov 2017  路  9Comments  路  Source: facebook/create-react-app

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鈥檛 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 :-(

Most helpful comment

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)

All 9 comments

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.

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

Sorry we cannot be of more help!

I tried a lot of stuff including:

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

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:

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

please file a bug with npm.

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

Thanks for helping.

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)

Thanx @peterobrien 馃憤

probem installing create-react-app

npm ERR! Refusing to delete C:UsersEMBASHAppDataRoamingnpmcreate-react-app
: node_modules/create-react-app/index.js symlink target is not controlled by npm
C:UsersEMBASHAppDataRoamingnpmnode_modulescreate-react-app
npm ERR! File exists: C:UsersEMBASHAppDataRoamingnpmcreate-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:UsersEMBASHAppDataRoamingnpm-cache_logs2018-09-07T08_34_18
_292Z-debug.log

C:UsersEMBASH>npm install create-react-app -g -f
npm WARN using --force I sure hope you know what you are doing.
npm ERR! path C:UsersEMBASHAppDataRoamingnpmcreate-react-app
npm ERR! code EEXIST
npm ERR! Refusing to delete C:UsersEMBASHAppDataRoamingnpmcreate-react-app
: node_modules/create-react-app/index.js symlink target is not controlled by npm
C:UsersEMBASHAppDataRoamingnpmnode_modulescreate-react-app
npm ERR! File exists: C:UsersEMBASHAppDataRoamingnpmcreate-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:UsersEMBASHAppDataRoamingnpm-cache_logs2018-09-07T08_36_39
_470Z-debug.log

Was this page helpful?
0 / 5 - 0 ratings

Related issues

razvan-soare picture razvan-soare  路  161Comments

jantimon picture jantimon  路  154Comments

sgriffey picture sgriffey  路  113Comments

riceyeh picture riceyeh  路  116Comments

akctba picture akctba  路  80Comments