reaviz / reaflow

🎯 React library for building workflow editors, flow charts and diagrams. Maintained by @goodcodeus.
https://reaflow.dev
Apache License 2.0
2.17k stars 124 forks source link

Problem with update react 18 and node 20 #237

Open vladanPro opened 1 year ago

vladanPro commented 1 year ago

I am trying to update my application with realflow from reactjs 16 to reactjs 18 and i get error for missing file with extension. I was using react default with JS.


[ ] 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

After update with node update i get error


`ERROR in ./node_modules/reaflow/dist/index.js 19:0-40
Module not found: Error: Can't resolve 'elkjs/lib/elk.bundled' in 'D:\CODE\Projects\is-suk-client\node_modules\reaflow\dist'
Did you mean 'elk.bundled.js'?
BREAKING CHANGE: The request 'elkjs/lib/elk.bundled' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.`

What is the motivation / use case for changing the behavior?

I can't change lib and see only dist folder in node_modules but my settings is with "type": "module" in package.json.

Environment


Libs:
- react version: 18.2.0
- reaflow version: 5.2.6
- @mui/materia version: 5.14.15

Browser:
- [X] Chrome (desktop) version XX
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [X] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX

For Tooling issues:
- Node version: v20.8.1
- Platform: Windows 11            
amcdnl commented 1 year ago

What build system are you using?

vladanPro commented 1 year ago

I don't know on what your ask? npm and windows :)

amcdnl commented 1 year ago

create-react-app? vite? webpack?

vladanPro commented 1 year ago

aha webpack