Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when running "npm init vite-app <project-name>" on windows #587

Closed
ljcremer opened this issue Jul 20, 2020 · 1 comment
Closed

Error when running "npm init vite-app <project-name>" on windows #587

ljcremer opened this issue Jul 20, 2020 · 1 comment

Comments

@ljcremer
Copy link

Do NOT ignore this template or your issue will have a very high chance to be closed without comment.

Describe the bug

I am trying to use vite for the first time on my windows machine and it is giving me the following errors. I think it might be related that my username on Windows is two words "Leonard Cremer":

C:\Trooptravel\Development>npm init vite-app vuevite
npm ERR! code ENOLOCAL
npm ERR! Could not install from "Cremer\AppData\Roaming\npm-cache_npx\16932" 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\Leonard Cremer\AppData\Roaming\npm-cache_logs\2020-07-20T07_39_09_584Z-debug.log
Install for create-vite-app@latest failed with code 1

C:\Trooptravel\Development>npm init vite-app vuevite
npm ERR! code ENOLOCAL
npm ERR! Could not install from "Cremer\AppData\Roaming\npm-cache_npx\12400" 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\Leonard Cremer\AppData\Roaming\npm-cache_logs\2020-07-20T07_43_38_245Z-debug.log
Install for create-vite-app@latest failed with code 1

Reproduction

Run the following in Windows terminal
npm init vite-app vuevite

System Info

Windows 10
Node 10

Logs (Optional if provided reproduction)

0 info it worked if it ends with ok
1 verbose cli [ 'C:\Program Files\nodejs\node.exe',
1 verbose cli 'C:\nvm\v10.16.1\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'install',
1 verbose cli 'create-vite-app@latest',
1 verbose cli '--global',
1 verbose cli '--prefix',
1 verbose cli 'C:\Users\Leonard',
1 verbose cli 'Cremer\AppData\Roaming\npm-cache\_npx\12400',
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 2fb9daec28b89413
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 silly fetchPackageMetaData error for file:Cremer\AppData\Roaming\npm-cache_npx\12400 Could not install from "Cremer\AppData\Roaming\npm-cache_npx\12400" as it does not contain a package.json file.
8 http fetch GET 200 https://registry.npmjs.org/create-vite-app 26ms (from cache)
9 silly pacote tag manifest for create-vite-app@latest fetched in 36ms
10 timing stage:rollbackFailedOptional Completed in 1ms
11 timing stage:runTopLevelLifecycles Completed in 44ms
12 verbose stack Error: ENOENT: no such file or directory, open 'C:\Trooptravel\Development\Cremer\AppData\Roaming\npm-cache_npx\12400\package.json'
13 verbose cwd C:\Trooptravel\Development
14 verbose Windows_NT 10.0.18362
15 verbose argv "C:\Program Files\nodejs\node.exe" "C:\nvm\v10.16.1\node_modules\npm\bin\npm-cli.js" "install" "create-vite-app@latest" "--global" "--prefix" "C:\Users\Leonard" "Cremer\AppData\Roaming\npm-cache\_npx\12400" "--loglevel" "error" "--json"
16 verbose node v10.16.1
17 verbose npm v6.9.0
18 error code ENOLOCAL
19 error Could not install from "Cremer\AppData\Roaming\npm-cache_npx\12400" as it does not contain a package.json file.
20 verbose exit [ 1, true ]

@underfin
Copy link
Member

Please track here vitejs/create-vite-app#23

@github-actions github-actions bot locked and limited conversation to collaborators Jul 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants