storybookjs/storybook

[Bug]: Gatsby link and Storybook

开放

#22,065 创建于 2023年4月12日

 (8 条评论) (0 个反应) (0 位负责人)TypeScript (10,058 个派生)batch import
bugcompatibility with other toolsgatsbyhelp wantedsev:S3

仓库指标

星标
 (89,909 个星标)
PR 合并指标
 (平均合并 7天 22小时) (30 天内合并 184 个 PR)

描述

Describe the bug

Storybook is great, we've just upgraded gatsby and need to upgrade storybook. Both normally work absolutely fine.

Looking at gatsby's documentation, this hasn't been updated for storybook v7 yet, and parts of the systems working together doesn't work.

I've tried in existing and a fresh gatsby and storybook installation (github linked below)

Example, when using a gatsby <Link> component in a story, the system errors.

To Reproduce

https://github.com/darylthornhill/test-gatsby-storybook-error

All i've done is set up a gatsby Link and put it in the Header.tsx in the src/stories folder.

System

Environment Info:

  System:
    OS: macOS 13.2.1
    CPU: (10) arm64 Apple M2 Pro
  Binaries:
    Node: 18.15.0 - ~/.nvm/versions/node/v18.15.0/bin/node
    npm: 9.5.0 - ~/.nvm/versions/node/v18.15.0/bin/npm
  Browsers:
    Safari: 16.3
  npmPackages:
    @storybook/addon-essentials: ^7.0.4 => 7.0.4 
    @storybook/addon-interactions: ^7.0.4 => 7.0.4 
    @storybook/addon-links: ^7.0.4 => 7.0.4 
    @storybook/blocks: ^7.0.4 => 7.0.4 
    @storybook/react: ^7.0.4 => 7.0.4 
    @storybook/react-webpack5: ^7.0.4 => 7.0.4 
    @storybook/testing-library: ^0.0.14-next.2 => 0.0.14-next.2

Additional context

No response

贡献者指南