PS D:\code\app> yarn electron-forge import
yarn run v1.22.19
$ D:\code\app\node_modules\.bin\electron-forge import
D:\code\app\node_modules\listr2\dist\index.cjs:126
var import_wrap_ansi = __toESM(require("wrap-ansi"), 1);
^
Error [ERR_REQUIRE_ESM]: require() of ES Module D:\code\app\node_modules\wrap-ansi\index.js from D:\code\app\node_modules\listr2\dist\index.cjs not supported.
at Object.<anonymous> (D:\code\app\node_modules\@electron-forge\cli\dist\electron-forge.js:10:18) {
code: 'ERR_REQUIRE_ESM'
at Object.<anonymous> (D:\code\app\node_modules\@electron-forge\cli\dist\electron-forge.js:10:18) {
code: 'ERR_REQUIRE_ESM'
}
Node.js v19.2.0
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
PS D:\code\app> npx electron-forge import
D:\code\app\node_modules\listr2\dist\index.cjs:126
var import_wrap_ansi = __toESM(require("wrap-ansi"), 1);
^
Error [ERR_REQUIRE_ESM]: require() of ES Module D:\code\app\node_modules\wrap-ansi\index.js from D:\code\app\node_modules\listr2\dist\index.cjs not supported.
Instead change the require of index.js in D:\code\app\node_modules\listr2\dist\index.cjs to a dynamic import() which is available in all CommonJS modules.
at Object.<anonymous> (D:\code\app\node_modules\listr2\dist\index.cjs:126:32)
at Object.<anonymous> (D:\code\app\node_modules\@electron-forge\cli\dist\electron-forge.js:10:18) {
code: 'ERR_REQUIRE_ESM'
}
Node.js v19.2.0
Pre-flight checklist
Electron Forge version
Error [ERR_REQUIRE_ESM]: node_modules\listr2\dist\index.cjs not supported
Electron version
v25.4.0
Operating system
Windows 11 (22621.1992)
Last known working Electron Forge version
No response
Expected behavior
An error occurred while using electron forge.
Current version
Actual behavior
package.json
Steps to reproduce
Additional information
No response