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

Cannot find module 'browserslist-config-single-spa' #133

Closed
rafalmaciejewski opened this issue Nov 30, 2021 · 3 comments · Fixed by #137
Closed

Cannot find module 'browserslist-config-single-spa' #133

rafalmaciejewski opened this issue Nov 30, 2021 · 3 comments · Fixed by #137

Comments

@rafalmaciejewski
Copy link

rafalmaciejewski commented Nov 30, 2021

This error comes up when building webpack apps that include single-spa-react. It's thrown from babel-loader. It was introduced in 4.5.0 - 4.4.0 works fine. I think that to fix it browserslist-config-single-spa should be moved from devDependencies to dependencies.

ERROR in ./node_modules/single-spa-react/lib/esm/single-spa-react.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: Cannot find module 'browserslist-config-single-spa'
@rafalmaciejewski
Copy link
Author

I fixed it by setting a rule to load single-spa-react with ignorebrowserslistconfig option in babel-loader config. So it occurs when loading node_modules with babel-loader for transpilation. I remember it was the default config in create-react-app so it may be worth to fix it here as well.

@joeldenning
Copy link
Member

Thanks for reporting this, I've created #137 to fix this.

@joeldenning
Copy link
Member

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

Successfully merging a pull request may close this issue.

2 participants