-
Notifications
You must be signed in to change notification settings - Fork 106
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
The requested module does not provide an export named 'default' #37
Comments
Have you tried adding the problematic dependencies to optimizeDeps? |
Adding |
I'm seeing storybookjs/builder-vite#37 but I can't figure out how to fix it.
Adding |
Do you see any messages in your terminal about vite finding new dependencies? |
Yes @IanVS , there is one actually:
What should I do with that? |
@akbarik, that also needs to be added to your |
Damn, now this error happens when I open Storybook ((
This error is referring to |
@akbarik is it possible for you to share a link to your project? I believe you should be able to add Why do you say the error refers to |
You're right, the problem was with overwriting the existing |
This thread saved my day today. Thank you! |
Thread helped me thanks everyone |
Where to add @emotion/react ? export default defineConfig({ |
Switching from the regular builder, I removed storybook from my project and re-installed it using
npx sb@next init --builder storybook-builder-vite
.storybook/main.js
module.exports = { core: { builder: "storybook-builder-vite" }, async viteFinal(config, { configType }) { // customize the Vite config here config.resolve.alias = { ...config.resolve.alias, ...absolutePathAliases };},
stories: [
"../src//*.stories.mdx",
"../src//*.stories.@(js|jsx|ts|tsx)"
],
addons: [
"@storybook/addon-actions",
"@storybook/addon-essentials",
"storybook-addon-intl",
{
name: '@storybook/addon-postcss',
options: {
postcssLoaderOptions: {
implementation: require('postcss'),
},
},
},
],
typescript: {
check: false,
checkOptions: {},
reactDocgen: 'react-docgen-typescript',
},
}
When starting storybook I have no error, but when I open storybook in the browser I get this error :
Uncaught SyntaxError: The requested module '/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js?v=403370d2' does not provide an export named 'default'
coming fromemotion-theming.browser.esm.js?v=403370d2
I'm not sure if this issue is related to this repo directly but I have to start somewhere :)
The text was updated successfully, but these errors were encountered: