Skip to content

[Bug]: storybook dev crash by file-system-cache #23189

Open

Description

Describe the bug

This is a rare error in the storybook cli and cannot be reproduced. It can be cured by deleting node_modules/.cache/storybook/dev-server.The error log is below.

> storybook dev -p 6006

@storybook/cli v7.0.22

info => Serving static files from ././public at /
info => Starting manager..
╭───────────────────────────────────────────────────╮
│                                                   │
│   Storybook 7.0.22 for react-vite started         │
│   191 ms for manager and 2.49 s for preview       │
│                                                   │
│    Local:            http://localhost:6006/       │
│    On your network:  http://192.168.11.7:6006/    │
│                                                   │
╰───────────────────────────────────────────────────╯
/home/re-taro/projects/github.com/suzuka-kosen-festa/2023-hp/node_modules/.pnpm/file-system-cache@2.3.0/node_modules/file-system-cache/lib/common/Util.js:74
            throw new Error(`Failed to read cache value at: ${path}. ${error.message}`);
                  ^

Error: Failed to read cache value at: /home/re-taro/projects/github.com/suzuka-kosen-festa/2023-hp/node_modules/.cache/storybook/dev-server/a5a8bf6e622aef57065c6498611f40c911543d7d-f086b87885981c04ce7a583ff90a49313de83de7. /home/re-taro/projects/github.com/suzuka-kosen-festa/2023-hp/node_modules/.cache/storybook/dev-server/a5a8bf6e622aef57065c6498611f40c911543d7d-f086b87885981c04ce7a583ff90a49313de83de7: Unexpected end of JSON input
    at Object.<anonymous> (/home/re-taro/projects/github.com/suzuka-kosen-festa/2023-hp/node_modules/.pnpm/file-system-cache@2.3.0/node_modules/file-system-cache/lib/common/Util.js:74:19)
    at Generator.throw (<anonymous>)
    at rejected (/home/re-taro/projects/github.com/suzuka-kosen-festa/2023-hp/node_modules/.pnpm/file-system-cache@2.3.0/node_modules/file-system-cache/lib/common/Util.js:6:65)

Node.js v20.3.0
 ELIFECYCLE  Command failed with exit code 1.

To Reproduce

No response

System

System:
    OS: Linux 6.3 Arch Linux
    CPU: (12) x64 AMD Ryzen 5 5600U with Radeon Graphics
  Binaries:
    Node: 20.3.0 - ~/.asdf/installs/nodejs/20.3.0/bin/node
    npm: 9.6.7 - ~/.asdf/plugins/nodejs/shims/npm
  npmPackages:
    @storybook/addon-a11y: 7.0.22 => 7.0.22 
    @storybook/addon-essentials: 7.0.22 => 7.0.22 
    @storybook/addon-interactions: 7.0.22 => 7.0.22 
    @storybook/addon-links: 7.0.22 => 7.0.22 
    @storybook/blocks: 7.0.22 => 7.0.22 
    @storybook/react: 7.0.22 => 7.0.22 
    @storybook/react-vite: 7.0.22 => 7.0.22 
    @storybook/testing-library: 0.2.0 => 0.2.0

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    • Status

      No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions