adityasonel / react-animated-tree-v2

🌲 Simple to use, configurable tree view with full support for drop-in animations, react-animated-tree-v2.
https://adityasonel.github.io/react-animated-tree-v2
MIT License
11 stars 5 forks source link

Recent release has broken build process #8

Open danielcherrington opened 1 year ago

danielcherrington commented 1 year ago

When building a NextJS app on vercel using the latest version the following build error happens


Error [ERR_REQUIRE_ESM]: require() of ES Module /vercel/path0/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js from /vercel/path0/node_modules/react-animated-tree-v2/node_modules/react-spring/renderprops.js not supported.
--
14:07:03.357 | Instead change the require of objectWithoutPropertiesLoose.js in /vercel/path0/node_modules/react-animated-tree-v2/node_modules/react-spring/renderprops.js to a dynamic import() which is available in all CommonJS modules.
InsOpDe commented 1 year ago

@danielcherrington You need at least nextjs 12 which supports ES Modules.

or you can use next-transpile-modules" to transpile it for you - the modules which you have to transpile are react-animated-tree-v2 and react-spring (or react-spring/renderprops)

danielcherrington commented 1 year ago

I am using NextJS 12. I will review the configuration