Repository: storybook
Issue: [Bug]: Upgrading from 8.1.11 fails on Vue app running in Docker
Labels: bug,compatibility with other tools

### Describe the bug

I discovered this problem when upgrading Storybook to `8.2.6`. I had been happily using storybook for a couple years in this app.

I decided to create a completely new app as a minimal test and I get the same error.

A summary of what i did:
1) started a docker container
2) created a Vue app using the recommended Vue instructions
3) added Storybook using the recommended instructions
Result: an error when attempting to start Storybook.

(The reproduction link field doesn't make sense in this case because this happens purely on the command line as storybook starts.)

### Reproduction link

https://github.com/storybookjs/storybook/issues/new

### Reproduction steps

My Docker file is:
```
FROM node:20.14.0

RUN apt-get update

RUN npm install -g nodemon

RUN npm install -g npm@10.8.2

RUN mkdir /srv/app && chown node:node /srv/app

WORKDIR /srv/app
```

This is the entire command line of what happened:
```
$ docker compose run  --publish 6006:6006 --name=nmpstory --rm app bash
root@0c03b6239347:/srv/app# cd temp/
root@0c03b6239347:/srv/app/temp# npm create vue@latest
Need to install the following packages:
create-vue@3.10.4
Ok to proceed? (y) y


> npx
> create-vue


Vue.js - The Progressive JavaScript Framework

✔ Project name: … sbtest
✔ Add TypeScript? … No / Yes # I chose Yes
✔ Add JSX Support? … No / Yes # I chose no
✔ Add Vue Router for Single Page Application development? … No / Yes # I chose Yes
✔ Add Pinia for state management? … No / Yes # I chose Yes
✔ Add Vitest for Unit Testing? … No / Yes # I chose Yes
✔ Add an End-to-End Testing Solution? › No 
✔ Add ESLint for code quality? … No / Yes # I chose Yes
✔ Add Prettier for code formatting? … No / Yes # I chose No
✔ Add Vue DevTools 7 extension for debugging? (experimental) … No / Yes # I chose No

Scaffolding project in /srv/app/temp/sbtest...

Done. Now run:

  cd sbtest
  npm install
  npm run dev

root@0c03b6239347:/srv/app/temp# cd sbtest/
root@0c03b6239347:/srv/app/temp/sbtest# npx storybook@latest init
Need to install the following packages:
storybook@8.2.6
Ok to proceed? (y) y

npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm warn deprecated rimraf@2.6.3: Rimraf versions prior to v4 are no longer supported
╭──────────────────────────────────────────────────────╮
│                                                      │
│   Adding Storybook version 8.2.6 to your project..   │
│                                                      │
╰──────────────────────────────────────────────────────╯
 • Detecting project type. ✓
Installing dependencies...

npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm warn deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported
npm warn deprecated @humanwhocodes/object-schema@2.0.3: Use @eslint/object-schema instead
npm warn deprecated @humanwhocodes/config-array@0.11.14: Use @eslint/config-array instead

added 336 packages, and audited 337 packages in 2m

77 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
 • Adding Storybook support to your "Vue 3" app • Detected Vite project. Setting builder to Vite. ✓

  ✔ Getting the correct version of 10 packages
    Configuring Storybook ESLint plugin at .eslintrc.cjs
  ✔ Installing Storybook dependencies
. ✓
Installing dependencies...


up to date, audited 872 packages in 980ms

178 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

attention => Storybook now collects completely anonymous telemetry regarding usage.
This information is used to shape Storybook's roadmap and prioritize features.
You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
https://storybook.js.org/telemetry

╭──────────────────────────────────────────────────────────────────────────────╮
│                                                                              │
│   Storybook was successfully installed in your project! 🎉                   │
│   To run Storybook manually, run npm run storybook. CTRL+C to stop.          │
│                                                                              │
│   Wanna know more about Storybook? Check out https://storybook.js.org/       │
│   Having trouble or want to chat? Join us at https://discord.gg/storybook/   │
│                                                                              │
╰──────────────────────────────────────────────────────────────────────────────╯

Running Storybook

> sbtest@0.0.0 storybook
> storybook dev -p 6006 --initial-path=/onboarding --quiet

storybook v8.2.6

info => Starting manager..
info => Starting preview..
/srv/app/temp/sbtest/node_modules/storybook/bin/index.cjs:23
  throw error;
  ^

Error: spawn xdg-open 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: -2,
  code: 'ENOENT',
  syscall: 'spawn xdg-open',
  path: 'xdg-open',
  spawnargs: [ 'http://localhost:6006/?path=/onboarding' ]
}

Node.js v20.14.0
root@0c03b6239347:/srv/app/temp/sbtest# npm run storybook

> sbtest@0.0.0 storybook
> storybook dev -p 6006

storybook v8.2.6

info => Starting manager..
info => Starting preview..
/srv/app/temp/sbtest/node_modules/storybook/bin/index.cjs:23
  throw error;
  ^

Error: spawn xdg-open 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: -2,
  code: 'ENOENT',
  syscall: 'spawn xdg-open',
  path: 'xdg-open',
  spawnargs: [ 'http://localhost:6006/' ]
}

Node.js v20.14.0
root@0c03b6239347:/srv/app/temp/sbtest#
``` 

### System

```bash
Storybook Environment Info:

  System:
    OS: Linux 6.6 Debian GNU/Linux 12 (bookworm) 12 (bookworm)
    CPU: (10) arm64 unknown
    Shell: 5.2.15 - /bin/bash
  Binaries:
    Node: 20.14.0 - /usr/local/bin/node
    Yarn: 1.22.22 - /usr/local/bin/yarn
    npm: 10.8.2 - /usr/local/bin/npm <----- active
  npmPackages:
    @storybook/addon-essentials: ^8.2.6 => 8.2.6
    @storybook/addon-interactions: ^8.2.6 => 8.2.6
    @storybook/addon-links: ^8.2.6 => 8.2.6
    @storybook/addon-onboarding: ^8.2.6 => 8.2.6
    @storybook/blocks: ^8.2.6 => 8.2.6
    @storybook/test: ^8.2.6 => 8.2.6
    @storybook/vue3: ^8.2.6 => 8.2.6
    @storybook/vue3-vite: ^8.2.6 => 8.2.6
    eslint-plugin-storybook: ^0.8.0 => 0.8.0
    storybook: ^8.2.6 => 8.2.6
```


### Additional context

_No response_