NaturalSelectionLabs/Unidata

Use Unidata in koa-ts

jokereven opened this issue · 1 comments

Q:[ERROR] 15:52:11 Error: require() of ES Module /root/Desktop/github.com/jokereven/free-mint-nft-tx-analysis/node_modules/lodash-es/lodash.js from /root/Desktop/github.com/jokereven/free-mint-nft-tx-analysis/node_modules/unidata.js/dist/index.js not supported.
Instead change the require of lodash.js in /root/Desktop/github.com/jokereven/free-mint-nft-tx-analysis/node_modules/unidata.js/dist/index.js to a dynamic import() which is available in all CommonJS modules.

i have try to use unidata in koa-ts that code like https://gist.github.com/jokereven/da66c8dd17d60ff7191a9504f2118eb6, i find it's in stackoverflow https://stackoverflow.com/questions/70309135/chalk-error-err-require-esm-require-of-es-module it's mean to add "type": "module" to package.json, how can i do respect.

i use it's in one js file is run okay, respect.