Open clemencefrz opened 12 months ago
Same with BROWSER=none
(lowercase):
errno: -2,
code: 'ENOENT',
syscall: 'spawn none',
path: 'none',
spawnargs: [ 'http://localhost:6006/' ]
How to prevent storybook from opening a browser?!?
My current workaround:
BROWSER=true npm run storybook
It then runs /bin/true
instead of a browser, which just returns success…
I can confirm @mwaeckerlin suggestion's works
Describe the bug
When running the Storybook development script, I encounter an ENOENT error with the message "NONE." This error occurs because my environment variable BROWSER is set to "NONE." However, there is no warning or error thrown if the value of process.env.BROWSER is invalid.
To Reproduce
run
BROWSER="NONE" npx storybook dev
System
Additional context
`node:events:491 throw er; // Unhandled 'error' event ^
Error: spawn NONE ENOENT at node_internal_captureLargerStackTrace (node:internal/errors:490:5) at node_internal_errnoException (node:internal/errors:620:12) at ChildProcess._handle.onexit (node:internal/child_process:283:19) at onErrorNT (node:internal/child_process:476: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:289:12) at onErrorNT (node:internal/child_process:476:16) at process.processTicksAndRejections (node:internal/process/task_queues:82:21) { errno: -2, code: 'ENOENT', syscall: 'spawn NONE', path: 'NONE', spawnargs: [ 'http://localhost:45713/' ] }`