Lib broken since 5.2.0
AykutSarac opened this issue · comments
Aykut Saraç commented
I'm submitting a...
[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Other... Please describe:
Current behavior
Expected behavior
Minimal reproduction of the problem with instructions
What is the motivation / use case for changing the behavior?
Environment
Libs:
- react version: 18.2.0
- nextjs: 13.4.12
Browser:
- [ ] Chrome (desktop) version XX
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX
For Tooling issues:
- Node version: 18
- Platform: MacOS
Others:
lin onetwo commented
Same here after 5.1.2 -> 5.2.2
My error is
Layout Error: TypeError: import_calculate_size.default is not a function
measureText $:/plugins/linonetwo/flow-chart/components/ReaFlowLibrary.js:108645
formatText $:/plugins/linonetwo/flow-chart/components/ReaFlowLibrary.js:108684
mapNode $:/plugins/linonetwo/flow-chart/components/ReaFlowLibrary.js:108746
mapInput $:/plugins/linonetwo/flow-chart/components/ReaFlowLibrary.js:108812
elkLayout $:/plugins/linonetwo/flow-chart/components/ReaFlowLibrary.js:108863
_promise $:/plugins/linonetwo/flow-chart/components/ReaFlowLibrary.js:106701
PCancelable $:/plugins/linonetwo/flow-chart/components/ReaFlowLibrary.js:106675
elkLayout $:/plugins/linonetwo/flow-chart/components/ReaFlowLibrary.js:108859
useLayout $:/plugins/linonetwo/flow-chart/components/ReaFlowLibrary.js:108907
Austin commented
@AykutSarac - Hmmm I'm using it in several projects and not having issues. I think its related to NextJS and its support for ES Modules.
Aykut Saraç commented
I'm thinking it's about build export change. Related to this commit 600c2a6
5.2.0:
- index.js
- index.umd.cjs
5.1.2:
- index.cjs.js
- index.esm.js
- index.js
Austin commented
Ya, its the build. I changed it to ES Module type but seems Next doesn't like that. FWIW I'm using this in several other projects w/ no issues but we are using Vite.