react-arborist
react-arborist copied to clipboard
"TypeError: r_.clear is not a function" in Docker container
I am using NextJS (v13.0.3) and implemented the basic example (https://github.com/brimdata/react-arborist#examples). When running this in a production build (e.g. npm run build npm run start) the example loads and works as expected. When I create a docker container and launch that, the same example produces the following errors:
It seems to stem from the deselectAll function call, however, I am not making calls to that function and the error occurs when attempting to load the tree UI.
It's a bug in SWC minifier, adding swcMinify: false, to next.config.js fixes the issue
https://github.com/swc-project/swc/discussions/7664
@remorses Amazing. Saved me another frustrating day at the office :) Thank you!
I was also getting the same thing, rather with TypeError: r_.only is not a function, only in a built version of my next.js app, running in pm2.
swcMinify: false solved the issue.
@remorses is there anything that needs to change in this library? Do we need to upgrade a dependency?