Skip to content
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

Uncaught SyntaxError: The requested module '/node_modules/lodash/isPlainObject.js?v=5fe384f6' does not provide an export named 'default' #17273

Closed
olemarius opened this issue Jan 18, 2022 · 2 comments

Comments

@olemarius
Copy link

Describe the bug
Running 'start-storybook' opens storybook but throws error before any stories are loaded:
args.js?v=5fe384f6:56 Uncaught SyntaxError: The requested module '/node_modules/lodash/isPlainObject.js?v=5fe384f6' does not provide an export named 'default'

image

To Reproduce
I've been able to make it work again by running lerna clean (I'm using lerna), deleting package-lock files, testing to run the project's vite serve command first, but I haven't been able to identify exactly what makes it work again once getting the error. It seems very random.

System
npx sb@next info prompts me to install it.
Storybook 6.4.13 on Windows using storybook-builder-vite 0.1.13

@olemarius
Copy link
Author

Adding to optimizeDeps resolved some errors, but then I just get the next.. I'm thinking this might be an issue with the bundler, storybook-builder-vite?

Uncaught SyntaxError: The requested module '/node_modules/@storybook/csf/dist/index.js?v=5898ea95' does not provide an export named 'storyNameFromExport'

        config.optimizeDeps.include = [
            ...(config.optimizeDeps?.include ?? []), 
            // adding the ones that causes error here seems to work, but it seems it's a problem for a lot of dependencies?
            'lodash/isPlainObject',
            'lodash/mapValues',
            'util-deprecate',
        ];```

@olemarius
Copy link
Author

This was an issue with the bundler, see storybookjs/builder-vite#208

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant