-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docs tab disappears when updating addon-docs from v6.4 to v6.5 #18876
Comments
I'm seeing this after upgrading from 6.4 as well. I think this is the same issue as #17527 - my browser console doesn't show any errors unless I navigate to a MDX story. |
@bartaz could you let me know if setting your import { themes } from "@storybook/theming";
import "vanilla-framework/scss/build.scss";
// or global addParameters
export const parameters = {
docs: {
...require('@storybook/addon-docs/preview').parameters.docs,
theme: themes.vanillaish,
},
}; |
Hey @kherock thanks for the tips, unfortunately adding Not sure how similar it is to #17527, because in our case the Docs tab doesn't show up at all, even in the toolbar, you can't navigate to it, and we don't see the |
My experience was the same where I have no docs tab either. My setup is slightly different in that I have MDX stories that show the error in the linked issue when I navigate to them. |
We've been trying to upgrade to 6.5.x and this has also tripped us up. Unfortunately none of the above suggestions have helped us. We aren't writing As reported by @bartaz I can also navigate directly to the |
I'm seeing this again after noticing that what seemed to fix it locally didn't end up doing anything after it went through my CI. I'm not even using MDX at all in this storybook - the only things that are somewhat out of the ordinary are that I'm using Yarn 3 and have a custom |
I came up with another potential fix: // main.js
module.exports = {
addons: [
{
name: path.dirname(require.resolve('@storybook/addon-docs/package.json')),
options: { transcludeMarkdown: true },
},
{ name: '@storybook/addon-essentials', options: { docs: false } },
} I noticed that the docs page comes back if I enabled the docs addon via It seems like the problem might be in the way the addon loader resolves files under the package root. It seems to only arise when PnP is enabled as enabling the node-modules linker seems to also fix the missing tab. |
@kherock you're a legend! Gave the |
In attempt to clean up old issue, I will be closing this one. We've made lots of improvements in Storybook since 7.0 so it's quite likely that this issue has been resolved already. If this is still a problem, please open a new issue with reproduction steps for 7.x version. Thank you! |
For anyone running into this issue in 2024
// main.js
const config = {
stories: [
'../src/**/*.mdx',
'../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'
],
addons: [
'@storybook/addon-docs',
'@storybook/addon-links',
'@storybook/addon-essentials',
'@chromatic-com/storybook',
'@storybook/addon-interactions'
],
framework: {
name: '@storybook/html-vite',
options: {},
},
}; // preview.js
const preview = {
parameters: {
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/i,
},
},
},
tags: ['autodocs'],
}; |
Describe the bug
When Storybook v6.5 was introduced we noticed that upgrading to it resulted in "Docs" tab in our React documentation to disappear.
I narrowed it down to
@storybook/addon-docs
package specifically. Everything else can use latest version "6.5.10", but I have to keep@storybook/addon-docs
at6.4.22
to keep it running.There are no errors either in storybook logs in CLI, nor in the browser that would suggest anything wrong with addon-docs in 6.5.
Repo where it happens:
https://github.com/canonical/react-components
System
The text was updated successfully, but these errors were encountered: