Skip to content

[Bug]: SB_CORE-SERVER_0001 on read-only file system #31709

Open
@thatsmydoing

Description

@thatsmydoing

Describe the bug

To avoid impurities, we run our CI systems in a mostly read-only environment. storybook build --disable-telemetry fails to run with

Error loading global settings SB_CORE-SERVER_0001 (SavingGlobalSettingsFileError): Unable to save global settings file to $HOME/.storybook/settings.json
Reason: Error: EACCES: permission denied, open '$HOME/.storybook/settings.json'

This happens in 8.6.14 as well as 9.0.6. storybook dev also shows the error but continues to startup fine.

It seems build fails due to project json creation loading the global settings too and there's no CLI flag to turn it off. IIUC, this is also telemetry related. Maybe it should also respect STORYBOOK_DISABLE_TELEMETRY?

As a workaround, specifying disableProjectJson via the config file does work though. Though it would be nice to have this kind of thing be optional and not write to the home directory.

Reproduction link

n/a

Reproduction steps

  1. git clone https://github.com/storybookjs/sandboxes.git --depth=1
  2. cd sandboxes/react-webpack/18-ts/after-storybook
  3. npm install
  4. mkdir -p $HOME/.storybook
  5. chmod -w $HOME/.storybook
  6. npm run storybook-build

System

Storybook Environment Info:

  System:
    OS: Linux 6.11 Fedora Linux 41 (Forty One)
    CPU: (4) arm64 unknown
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 22.11.0 - /usr/bin/node
    npm: 10.9.0 - /usr/bin/npm <----- active
  npmPackages:
    @storybook/addon-docs: ^9.1.0-alpha.3 => 9.1.0-alpha.3
    @storybook/addon-onboarding: ^9.1.0-alpha.3 => 9.1.0-alpha.3
    @storybook/addon-webpack5-compiler-swc: ^3.0.0 => 3.0.0
    @storybook/react-webpack5: ^9.1.0-alpha.3 => 9.1.0-alpha.3
    storybook: ^9.1.0-alpha.3 => 9.1.0-alpha.3

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions