-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Open
Labels
Description
Describe the bug
When attempting to install Storybook on StackBlitz or Bolt.new, @storybook/addon-vitest
tries to install playwright, which hangs with the following error message:
› Configuring Playwright with Chromium (this might take some time):
npx playwright install chromium --with-deps
Error running postinstall script for @storybook/addon-vitest
Error: Command failed with exit code 1: npx playwright install chromium --with-deps
BEWARE: your OS is not officially supported by Playwright; installing dependencies for ubuntu20.04-x64 as a fallback.
Installing dependencies...
Switching to root user to install dependencies...
Failed to install browsers
Error: spawn su ENOENT
at makeError (/home/projects/vitejs-vite-9hr4xbcr/node_modules/storybook/dist/common/index.cjs:24517:67)
at handlePromise (/home/projects/vitejs-vite-9hr4xbcr/node_modules/storybook/dist/common/index.cjs:25135:15)
at async postInstall (/home/projects/vitejs-vite-9hr4xbcr/node_modules/@storybook/addon-vitest/dist/postinstall.js:94:896)
at async postinstallAddon (/home/.npm/_npx/e735b42ccbe56908/node_modules/@storybook/cli/dist/bin/index.cjs:83:873)
at async add (/home/.npm/_npx/e735b42ccbe56908/node_modules/@storybook/cli/dist/bin/index.cjs:85:2082) {
shortMessage: 'Command failed with exit code 1: npx playwright install chromium --with-deps',
command: 'npx playwright install chromium --with-deps',
escapedCommand: '"npx playwright install chromium --with-deps"',
exitCode: 1,
signal: undefined,
signalDescription: undefined,
stdout: 'Installing dependencies...\n' +
'Switching to root user to install dependencies...\n' +
'Failed to install browsers\n' +
'Error: spawn su ENOENT',
stderr: 'BEWARE: your OS is not officially supported by Playwright; installing dependencies for ubuntu20.04-x64 as a fallback.',
cwd: '/home/projects/vitejs-vite-9hr4xbcr',
failed: true,
timedOut: false,
isCanceled: false,
killed: false
}
Proposed solution
The installation of playwright should be skipped in unsupported environments.
Reproduction link
https://stackblitz.com/edit/vitejs-vite-9hr4xbcr
Reproduction steps
- Go to https://stackblitz.com/ and create a new React project
- Init Storybook via
npx storybook@latest init --yes
Additional context
No response
dosubot
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Needs Discussion