storybook-vue / storybook-nuxt

Deprecated in favor of https://github.com/nuxt-modules/storybook/
https://github.com/nuxt-modules/storybook/
132 stars 20 forks source link

Error "spawn npm ENOENT" during initial setup via npx storybook-nuxt init #59

Closed Pecral closed 5 months ago

Pecral commented 1 year ago

Environment

Windows 10 node.js 19.1

How to reproduce

Setup new project via:

PS C:\VisualStudio\nuxt-test\nuxt-app> npx storybook-nuxt init
▶ Initializing Storybook configuration...

Install dependencies 📦️

node:events:491 throw er; // Unhandled 'error' event ^

Error: spawn npm ENOENT at ChildProcess._handle.onexit (node:internal/child_process:285:19) at onErrorNT (node:internal/child_process:483: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:291:12) at onErrorNT (node:internal/child_process:483:16) at process.processTicksAndRejections (node:internal/process/task_queues:82:21) { errno: -4058, code: 'ENOENT', syscall: 'spawn npm', path: 'npm', spawnargs: [ 'install' ] }

chakAs3 commented 1 year ago

hi @Pecral is it possible for you to use pnpm instead, as it is fast and convenient.

Pecral commented 1 year ago

Hi @chakAs3, sadly I also have the issue in pnpm, as described above. See: PS C:\VisualStudio\storybook-nuxt> cd nuxt-app PS C:\VisualStudio\storybook-nuxt\nuxt-app> npx storybook-nuxt init ▶ Initializing Storybook configuration...

Install dependencies 📦️

node:events:491 throw er; // Unhandled 'error' event ^

Error: spawn pnpm ENOENT at ChildProcess._handle.onexit (node:internal/child_process:285:19) at onErrorNT (node:internal/child_process:483: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:291:12) at onErrorNT (node:internal/child_process:483:16) at process.processTicksAndRejections (node:internal/process/task_queues:82:21) { errno: -4058, code: 'ENOENT', syscall: 'spawn pnpm', path: 'pnpm', spawnargs: [ 'install' ] }

Node.js v19.1.0

chakAs3 commented 1 year ago

@Pecral can please create a repro repo for me so i can check it out

Pecral commented 1 year ago

It seems to be related to windows, as I don't have this issue on my macos machine. Will investigate further - a colleague of mine had the same issue on his windows machine

chakAs3 commented 1 year ago

It seems to be related to windows, as I don't have this issue on my macos machine. Will investigate further - a colleague of mine had the same issue on his windows machine

yes i will be looking at it thx for the support

Lustach commented 1 year ago

Have you made any progress in solving the problem? This will help a lot.

chakAs3 commented 1 year ago

Please check https://storybook.nuxtjs.org/examples

oscarhandsome commented 5 months ago

The same, followed by this https://storybook.nuxtjs.org/getting-started/setup "nuxt": "^3.11.2"

`$ npx storybook-nuxt init Directory is not empty ▶ Initializing Storybook configuration...

Install dependencies 📦️

ℹ 🔌 enableModule false 18:11:42 node:events:491 throw er; // Unhandled 'error' event ^

Error: spawn pnpm ENOENT at Process.ChildProcess._handle.onexit (node:internal/child_process:285:19) at onErrorNT (node:internal/child_process:485:16) at processTicksAndRejections (node:internal/process/task_queues:83:21) Emitted 'error' event on ChildProcess instance at: at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12) at onErrorNT (node:internal/child_process:485:16) at processTicksAndRejections (node:internal/process/task_queues:83:21) { errno: -4058, code: 'ENOENT', syscall: 'spawn pnpm', path: 'pnpm', spawnargs: [ 'install' ] }`