storybook
storybook copied to clipboard
Unable to start nuxt3 storybook project on windows
node version : 20.11.0 yarn version : 1.22.21 windows version : 23H2 (22631.3085)
Step to reproduce :
- Create nuxt3 repository using
npx nuxi@latest init
- Select yarn as package manager
- add storybook using
yarn add -D @nuxtjs/storybook
- Add nuxt config :
modules: [
'@nuxtjs/storybook',
],
storybook: {
url: 'http://localhost:6006',
storybookRoute: '/__storybook__',
port: 6006,
},
- yarn run dev
Result :
node:events:496
throw er; // Unhandled 'error' event
^
Error: spawn yarn ENOENT
at ChildProcess._handle.onexit (node:internal/child_process:286:19)
at onErrorNT (node:internal/child_process:484:16)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
Emitted 'error' event on ChildProcess instance at:
at ChildProcess._handle.onexit (node:internal/child_process:292:12)
at onErrorNT (node:internal/child_process:484:16)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
errno: -4058,
code: 'ENOENT',
syscall: 'spawn yarn',
path: 'yarn',
spawnargs: [ 'install' ]
}
Try to identify the situation :
- Do the same steps but in wsl-ubuntu
- WORKS !
- Copy the dependencies :
"react": "^18.2.0",
"react-dom": "^18.2.0",
"storybook": "7.6.7",
"@types/node": "^18.17.5",
"@storybook/vue3": "7.6.7",
"@storybook-vue/nuxt": "0.2.1",
"@nuxtjs/storybook": "7.0.0",
"@storybook/addon-links": "7.6.7",
"@storybook/builder-vite": "7.6.7",
"@storybook/addon-essentials": "7.6.7",
"@storybook/addon-interactions": "7.6.7",
"@storybook/testing-library": "^0.2.0",
"@storybook/blocks": "7.6.7"
- run yarn install
Result : same error
node:events:496
throw er; // Unhandled 'error' event
^
Error: spawn yarn ENOENT
at ChildProcess._handle.onexit (node:internal/child_process:286:19)
at onErrorNT (node:internal/child_process:484:16)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
Emitted 'error' event on ChildProcess instance at:
at ChildProcess._handle.onexit (node:internal/child_process:292:12)
at onErrorNT (node:internal/child_process:484:16)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
errno: -4058,
code: 'ENOENT',
syscall: 'spawn yarn',
path: 'yarn',
spawnargs: [ 'install' ]
}
2nd resolution try :
- Upgrade yarn
- admin console : corepack enable
- yarn set version stable ( v 4.1.0 )
- yarn install
- yarn run dev : Works ...
I've been working a full day on this previously @ job (4 days ago) and had a esbuild-arm error at theses steps. I am still posting this due to being helpfull for those stuck @ step1 but i'm confused.
While being there : The page : https://nuxt.com/modules/storybook have different steps to reproductions and is misleading to another repository : https://github.com/storybook-vue/storybook-nuxt.
Which is the official implementation ?
Had the same issue.
It seems that this line of code might cause the problems. spawn(cmd, [], { shell: true ... });
setting shell to true could fix this. I haven't verified this. But I had the same issue spawning processes on windows in some other script.
Same problem. Node v20.11.1 npm v10.4.0 Windows 22H2 (19045.4046)
Same issue here, its like @1337doctor said, i get the same error:
Directory is not empty ▶ Initializing Storybook configuration...
Install dependencies 📦️
ℹ 🔌 enableModule false 16:31:44
node:events:495
throw er; // Unhandled 'error' event
^
Error: spawn npm ENOENT at ChildProcess._handle.onexit (node:internal/child_process:284:19) at onErrorNT (node:internal/child_process:477:16) at process.processTicksAndRejections (node:internal/process/task_queues:82:21) Emitted 'error' event on ChildProcess instance at: at ChildProcess._handle.onexit (node:internal/child_process:290:12) at onErrorNT (node:internal/child_process:477:16) at process.processTicksAndRejections (node:internal/process/task_queues:82:21) { errno: -4058, code: 'ENOENT', syscall: 'spawn npm', path: 'npm', spawnargs: [ 'install' ] }
any updates ?
any updates ?
any updates ?
same problem here. any updates?