error in ./node_modules/@loadable/component/dist/loadable.esm.mjs
🐛 Bug Report
Can't import the named export 'isValidElementType' from non EcmaScript module (only default export is available)
version
5.16.2
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)
same problem
webpack 4
This is related to https://github.com/gregberge/loadable-components/pull/989, reason unknown
- this line
https://github.com/gregberge/loadable-components/blob/2210bcf43b0106776a872541f57afca1f3569491/packages/component/src/createLoadable.js#L3C35-L3C35got transpired in a little different way, ie it becameimport { isValidElementType } from 'react-is';instead ofimport * as ReactIs from 'react-is';
Please fallback to version 5.16.1
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",
Correct, 5.15.3 was the previous version.
5.16.3 has been released with the fix.
👋 Can someone confirm that the issue is no longer present so I can close the problem? 🙏
@theKashey 5.16.3 resolved the issue for me! Thank you 🙏
🚀