Closed sklawren closed 2 years ago
I manually copy+pasted the addon code into my storybook main.js and preview.js and it works.
The only difference between 0.0.3 and 0.0.4 is some dependencies in package-lock.json, though it's not clear which one(s) because github can't diff a large file like package-lock-json, but it's definitely breaking because of this.
Even though I locked my project to 0.0.3, this addon gets updated when you run npx sb upgrade
to install newer versions of storybook, which means you have to manually uninstall and reinstall 0.0.3 every time to fix it.
For now, I'm going to stop using this addon and just keep the copy+pasted code in main and preview, but you should really fix this ASAP.
Hey @sklawren, the change between 0.0.3 and 0.0.4 is supporting Gatsby's static queries (i.e. useStaticQuery()
and <StaticQuery>
).
You can see the changes in this commit: https://github.com/prismicio-community/storybook-addon-gatsby/commit/4014db558c10a5fcaf93fd5599c167f4061dcc80
Perhaps the addon could check the filesystem for that directory and conditionally apply static query support.
This is a community-run package so please feel free to contribute a PR. 🙂
@sklawren @feedm3 If you're able to, could you test out v0.0.5
and let me know if it fixes the error?
It removes the page-data/sq/d
static directory from the Storybook config. It shouldn't be necessary with the way Gatsby resolves static queries now. This path was apparently incorrect anyway (as it is relative to the .storybook
directory, not the root of the project).
Thanks!
The new version is working again, thank you very much for fixing it 🙂
Versions
Reproduction
I updated from 0.0.3 to 0.0.4 and Storybook build broke locally and on Chromatic with the following error:
I rolled back to 0.0.3 and it works again.