Skip to content

Commit 525832e

Browse files
obenlandclaude
andauthored
Create Storybook's settings directory in the Playwright image (#5629)
* Create Storybook's settings directory in the Playwright image Storybook 8.6 writes a global settings file to `$HOME/.storybook/`. The Playwright container runs as the host user id with no home directory, so `$HOME` resolves to `/` and the write fails with EACCES, which aborts the Storybook dev server before Playwright can connect. Pre-create the directory the same way the image already does for the corepack and dlx caches. Co-Authored-By: Claude Mythos 5.1 <noreply@anthropic.com> * Disable Storybook telemetry Storybook 8.6 asks on first start whether to send anonymous crash reports, unless telemetry is disabled or `CI` is set. The Playwright container has neither, and the prompt blocks the Storybook server until Playwright gives up waiting for it. Disabling telemetry skips the prompt and the settings lookup behind it. Verified locally with `pnpm test:storybook` on Storybook 8.6.17: all 317 Storybook tests pass with this and the settings directory change. Co-Authored-By: Claude Mythos 5.1 <noreply@anthropic.com> --------- Co-authored-by: Claude Mythos 5.1 <noreply@anthropic.com>
1 parent 7931ee6 commit 525832e

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

‎frontend/.storybook/main.ts‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,8 @@ const config: StorybookConfig = {
1414
docs: {
1515
autodocs: "tag",
1616
},
17+
core: {
18+
disableTelemetry: true,
19+
},
1720
}
1821
export default config

‎frontend/Dockerfile.playwright‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ COPY pnpm-lock.yaml .
1414
RUN mkdir -p /.cache/node/corepack/ && chmod -R 777 /.cache/node/corepack/
1515
# Ensure that the dlx cache folder exists and is writable
1616
RUN mkdir -p /.cache/pnpm/dlx/ && chmod -R 777 /.cache/pnpm/dlx/
17+
# Ensure Storybook's global settings folder exists and is writable
18+
RUN mkdir -p /.storybook/ && chmod -R 777 /.storybook/
1719

1820
# Requires `packageManager` field to be present in `frontend/package.json`.
1921
RUN npm install -g corepack@0.31.0 && corepack enable pnpm

0 commit comments

Comments
 (0)