retejs / context-menu-plugin

https://retejs.org
MIT License
11 stars 43 forks source link

Error generating build in nextjs [ES Module] #54

Closed LorhanSohaky closed 1 year ago

LorhanSohaky commented 2 years ago
Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /repo/node_modules/lodash-es/lodash.js
require() of ES modules is not supported.
require() of /repo/node_modules/lodash-es/lodash.js from /repo/node_modules/rete-context-menu-plugin/build/context-menu-plugin.common.js is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules.
Instead rename lodash.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from /repo/node_modules/lodash-es/package.json.
rete-js[bot] commented 1 year ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 10 days.