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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

error in ./node_modules/@loadable/component/dist/loadable.esm.mjs #990

Closed
ZhangDubhe opened this issue Dec 19, 2023 · 9 comments
Closed

Comments

@ZhangDubhe
Copy link

馃悰 Bug Report

Can't import the named export 'isValidElementType' from non EcmaScript module (only default export is available)

version

5.16.2

@guidrop17
Copy link

I have the same problem:

./node_modules/@loadable/component/dist/loadable.esm.mjs
Can't import the named export 'isValidElementType' from non EcmaScript module (only default export is available)

@yofine
Copy link

yofine commented Dec 20, 2023

same problem

webpack 4

@theKashey
Copy link
Collaborator

theKashey commented Dec 20, 2023

This is related to #989, reason unknown

  • this line https://github.com/gregberge/loadable-components/blob/2210bcf43b0106776a872541f57afca1f3569491/packages/component/src/createLoadable.js#L3C35-L3C35 got transpired in a little different way, ie it became import { isValidElementType } from 'react-is'; instead of import * as ReactIs from 'react-is';

Please fallback to version 5.16.1

@stevegacka
Copy link

I encountered same issue, with Webpack 4.

Falling back to 5.15.x of loadable packages resolved for me. NPM reported no 5.16.1 candiate for @loadable/component.

"@loadable/babel-plugin": "5.15.3",
"@loadable/component": "5.15.3",
"@loadable/server": "5.15.3",
"@loadable/webpack-plugin": "5.15.2",

@theKashey
Copy link
Collaborator

Correct, 5.15.3 was the previous version.

@theKashey
Copy link
Collaborator

5.16.3 has been released with the fix.

@theKashey
Copy link
Collaborator

馃憢 Can someone confirm that the issue is no longer present so I can close the problem? 馃檹

@stevegacka
Copy link

@theKashey 5.16.3 resolved the issue for me! Thank you 馃檹

@theKashey
Copy link
Collaborator

馃殌

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

No branches or pull requests

5 participants