Open kobe-leonelceolin opened 3 months ago
Disclaimer This information might be inaccurate, due to it being generated automatically
To resolve the issue, ensure the Typography
component is correctly imported in your Storybook configuration. Update the webpackFinal
field in .storybook/main.ts
to include the tsconfig-paths-webpack-plugin
for resolving TypeScript paths:
import TsconfigPathsPlugin from 'tsconfig-paths-webpack-plugin';
const config: StorybookConfig = {
// ... other configurations
webpackFinal: async (config) => {
config.resolve.plugins = [
...(config.resolve.plugins || []),
new TsconfigPathsPlugin({
extensions: config.resolve.extensions,
}),
];
return config;
},
};
export default config;
Ensure the Typography
component path is correct in your stories:
import { Typography } from '../components/Typography';
This should resolve the module not found error.
/code/core/src/server-errors.ts /docs/configure/webpack.mdx /code/frameworks/web-components-webpack5 /code/addons/docs/template/stories/docspage /code/builders/builder-webpack5 /docs/_snippets/web-components-webpack5-add-framework.md /code/core/src/csf-tools/CsfFile.test.ts /code/addons/interactions/template/stories /code/builders/builder-webpack5/src/preview /.github/DISCUSSION_TEMPLATE/help.yml /code/addons/docs/template/stories /test-storybooks/portable-stories-kitchen-sink/react/.storybook /code/frameworks/server-webpack5 /code/core/src/preview /code/frameworks/nextjs/template/cli /.github/comments/invalid-link.md /test-storybooks/portable-stories-kitchen-sink/nextjs/.storybook /code/lib/cli/src/automigrate/fixes/prompt-remove-react.ts /code/addons/interactions/template /.github/DISCUSSION_TEMPLATE/ideas.yml /code/builders/builder-webpack5/src /code/core/src/preview-errors.ts /code/frameworks/html-webpack5 /code/addons/docs/template/stories/docs2 /code/presets/server-webpack/src/index.ts
Describe the bug
I'm trying to upload my storybook to github pages and i'm facing this problem, does anyone can help?
More information: node version: v20.15.1 storybook: "^8.2.5" next: "14.2.5",
components/Typography.tsx
components/Typography.stories.tsx
storybook/main.ts
storybook/preview.ts
.github/workflows/deploy-github-pages.yaml
Reproduction link
https://stackblitz.com/edit/github-kcfh3e?file=.storybook%2Fpreview.ts
Reproduction steps
Given the information in the stackblitz link, try to build and deploy the storybook inside github pages and you're going to have the same error that i'm facing
System
Additional context
No response