Skip to content

Fails to install on windows 10, whitespace in path issue? #4042

Closed
@anderssonola

Description

@anderssonola

Is this a bug report?

yes

Did you try recovering your dependencies?

npm 5.60

Which terms did you search for in User Guide?

npx

Environment

  1. node -v: 9.5.0
  2. npm -v: 5.6.0
  3. yarn --version (if you use Yarn):
  4. npm ls react-scripts (if you haven’t ejected):

Then, specify:

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

Steps to Reproduce

  1. npx create-react-app my-app

Expected Behavior

The folder "my-app" is created and the create-react-app is installed in that folder

Actual Behavior

Failed to install create-react-app, looks like a problem with white-spaces in path, my user is "Ola Andersson" and the error message reports failure on "Andersson".

PowerShell log:

npm ERR! code ENOLOCAL
npm ERR! Could not install from "Andersson\AppData\Roaming\npm-cache\_npx\12704" as it does not contain a package.json file.
npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Ola Andersson\AppData\Roaming\npm-cache\_logs\2018-02-19T09_09_57_341Z-debug.log
Install for prefix@latest failed with code 1
npm ERR! code ENOLOCAL
npm ERR! Could not install from "Andersson\AppData\Roaming\npm-cache\_npx\1696" as it does not contain a package.json file.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Ola Andersson\AppData\Roaming\npm-cache\_logs\2018-02-19T09_10_03_239Z-debug.log
Install for create-react-app@latest failed with code 1

Npm error log:

1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'install',
1 verbose cli   'prefix@latest',
1 verbose cli   '--global',
1 verbose cli   '--prefix',
1 verbose cli   'C:\\Users\\Ola',
1 verbose cli   'Andersson\\AppData\\Roaming\\npm-cache\\_npx\\19436',
1 verbose cli   '--loglevel',
1 verbose cli   'error',
1 verbose cli   '--json' ]
2 info using [email protected]
3 info using [email protected]
4 verbose npm-session 2ab654195912f881
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 silly fetchPackageMetaData error for file:Andersson\AppData\Roaming\npm-cache\_npx\19436 Could not install from "Andersson\AppData\Roaming\npm-cache\_npx\19436" as it does not contain a package.json file.
8 http fetch GET 304 https://registry.npmjs.org/prefix 335ms (from cache)
9 silly pacote tag manifest for prefix@latest fetched in 458ms
10 verbose stack Error: ENOENT: no such file or directory, open 'C:\github\Andersson\AppData\Roaming\npm-cache\_npx\19436\package.json'
11 verbose cwd C:\github
12 verbose Windows_NT 10.0.16299
13 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "prefix@latest" "--global" "--prefix" "C:\\Users\\Ola" "Andersson\\AppData\\Roaming\\npm-cache\\_npx\\19436" "--loglevel" "error" "--json"
14 verbose node v9.5.0
15 verbose npm  v5.6.0
16 error code ENOLOCAL
17 error Could not install from "Andersson\AppData\Roaming\npm-cache\_npx\19436" as it does not contain a package.json file.
18 verbose exit [ 1, true ]

Reproducible Demo

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions