v4.0.11 Import Breaks in NextJS
Closed this issue · 5 comments
tim-soft commented
What is the current behavior?
Upgrading to the latest react-scrollbars-custom@4.0.11
yields this error in Next.js
[ error ] ./node_modules/react-scrollbars-custom/dist/rsc.next.mjs
Can't import the named export 'Component' from non EcmaScript module (only default export is available)
NextJS is weird in codesandbox, so here's how to repro
yarn create next-app test-app
cd test-app
yarn add react-scrollbars-custom@4.0.11
Add Scrollbars to /pages/index.js
import Scrollbars from 'react-scrollbars-custom';
Run the app
yarn dev
josh-stevens commented
Yep, was seeing this same issue in #95. That issue also pointed out that this package doesn't work in Edge anymore, I'm currently rolling back this package to find a version that does work.
xobotyi commented
I'm actually very confused... It does both, default and named exports >_>
export default Scrollbar;
export { Scrollbar, ScrollbarContext };
xobotyi commented
okay.. looks like it is node's .mjs
related stuff, have to roll back to .js
files now.
xobotyi commented
@tim-soft @josh-stevens v4.0.12 supposed to fix this one.
Recheck pls.