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 initialize storybook in create-react-app #10252

Closed
vimalraj9423 opened this issue Mar 30, 2020 · 2 comments
Closed

error when initialize storybook in create-react-app #10252

vimalraj9423 opened this issue Mar 30, 2020 · 2 comments
Labels
cli cra Prioritize create-react-app compatibility question / support

Comments

@vimalraj9423
Copy link

Describe the bug
npx -p @storybook/cli sb init
npm ERR! code ENOLOCAL
npm ERR! Could not install from "raj\AppData\Roaming\npm-cache_npx\15292" 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\vimal raj vel raj\AppData\Roaming\npm-cache_logs\2020-03-30T06_02_37_947Z-debug.log
Install for [ '@storybook/cli@latest' ] failed with code 1

Expected behavior
should initial storybook my create react app

System:
0 info it worked if it ends with ok
1 verbose cli [
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 '@storybook/cli@latest',
1 verbose cli '--global',
1 verbose cli '--prefix',
1 verbose cli 'C:\Users\vimal',
1 verbose cli 'raj',
1 verbose cli 'vel',
1 verbose cli 'raj\AppData\Roaming\npm-cache\_npx\15292',
1 verbose cli '--loglevel',
1 verbose cli 'error',
1 verbose cli '--json'
1 verbose cli ]
2 info using npm@6.13.4
3 info using node@v12.16.1
4 verbose npm-session dad081e5e8e33f9f
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 silly fetchPackageMetaData error for file:raj\AppData\Roaming\npm-cache_npx\15292 Could not install from "raj\AppData\Roaming\npm-cache_npx\15292" as it does not contain a package.json file.
8 http fetch GET 200 https://registry.npmjs.org/raj 66ms (from cache)
9 http fetch GET 200 https://registry.npmjs.org/vel 68ms (from cache)
10 silly pacote tag manifest for raj@latest fetched in 73ms
11 silly pacote tag manifest for vel@latest fetched in 72ms
12 http fetch GET 304 https://registry.npmjs.org/@storybook%2fcli 465ms (from cache)
13 silly pacote tag manifest for @storybook/cli@latest fetched in 491ms
14 timing stage:rollbackFailedOptional Completed in 1ms
15 timing stage:runTopLevelLifecycles Completed in 505ms
16 verbose stack Error: ENOENT: no such file or directory, open 'H:\JS\react\todo\raj\AppData\Roaming\npm-cache_npx\15292\package.json'
17 verbose cwd H:\JS\react\todo
18 verbose Windows_NT 10.0.18363
19 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "@storybook/cli@latest" "--global" "--prefix" "C:\Users\vimal" "raj" "vel" "raj\AppData\Roaming\npm-cache\_npx\15292" "--loglevel" "error" "--json"
20 verbose node v12.16.1
21 verbose npm v6.13.4
22 error code ENOLOCAL
23 error Could not install from "raj\AppData\Roaming\npm-cache_npx\15292" as it does not contain a package.json file.
24 verbose exit [ 1, true ]

@shilman shilman added cli cra Prioritize create-react-app compatibility question / support labels Mar 30, 2020
@shilman
Copy link
Member

shilman commented Mar 30, 2020

Can't repro. Can you try clearing your NPM cache?

@vimalraj9423
Copy link
Author

Running npx globally does not work on Windows when the user folder patch contains a space #146

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli cra Prioritize create-react-app compatibility question / support
Projects
None yet
Development

No branches or pull requests

2 participants