I was working on my plugin, and I added a new lib and it stopped building. After a bit, I removed it and tried again. Still errors. Looking closer at the trace, it seems the error is coming from modern and not my files?
Maybe a package was updated and broke everything?
C:\Users\game\Desktop\Code\Tiddly\Tiddly2PDF\node_modules\inquirer\lib\utils\screen-manager.js:4
const wrapAnsi = require('wrap-ansi');
^
Error [ERR_REQUIRE_ESM]: require() of ES Module C:\Users\game\Desktop\Code\Tiddly\Tiddly2PDF\node_modules\wrap-ansi\index.js from C:\Users\game\Desktop\Code\Tiddly\Tiddly2PDF\node_modules\inquirer\lib\utils\screen-manager.js not supported.
Instead change the require of index.js in C:\Users\game\Desktop\Code\Tiddly\Tiddly2PDF\node_modules\inquirer\lib\utils\screen-manager.js to a dynamic import() which is available in all CommonJS modules.
at Object.<anonymous> (C:\Users\game\Desktop\Code\Tiddly\Tiddly2PDF\node_modules\inquirer\lib\utils\screen-manager.js:4:18)
at Object.<anonymous> (C:\Users\game\Desktop\Code\Tiddly\Tiddly2PDF\node_modules\inquirer\lib\prompts\base.js:14:23)
at Object.<anonymous> (C:\Users\game\Desktop\Code\Tiddly\Tiddly2PDF\node_modules\inquirer\lib\prompts\list.js:11:14)
at promptModule.restoreDefaultPrompts (C:\Users\game\Desktop\Code\Tiddly\Tiddly2PDF\node_modules\inquirer\lib\inquirer.js:61:33)
at inquirer.createPromptModule (C:\Users\game\Desktop\Code\Tiddly\Tiddly2PDF\node_modules\inquirer\lib\inquirer.js:72:16)
at Object.<anonymous> (C:\Users\game\Desktop\Code\Tiddly\Tiddly2PDF\node_modules\inquirer\lib\inquirer.js:84:28)
at Object.<anonymous> (C:\Users\game\Desktop\Code\Tiddly\Tiddly2PDF\node_modules\tiddlywiki-plugin-dev\dist\js\init.js:11:40)
at Object.<anonymous> (C:\Users\game\Desktop\Code\Tiddly\Tiddly2PDF\node_modules\tiddlywiki-plugin-dev\dist\js\main.js:5:13) {
code: 'ERR_REQUIRE_ESM'
}
I was working on my plugin, and I added a new lib and it stopped building. After a bit, I removed it and tried again. Still errors. Looking closer at the trace, it seems the error is coming from modern and not my files?
Maybe a package was updated and broke everything?