storybookjs/storybook

[Bug]: Gatsby link and Storybook

Open

#22,065 建立於 2023年4月12日

在 GitHub 查看
 (8 留言) (0 反應) (0 負責人)TypeScript (89,909 star) (10,058 fork)batch import
bugcompatibility with other toolsgatsbyhelp wantedsev:S3

描述

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

貢獻者指南

[Bug]: Gatsby link and Storybook · storybookjs/storybook#22065 | Good First Issue