-
-
Notifications
You must be signed in to change notification settings - Fork 3
Install Error
Mark edited this page Sep 28, 2023
·
1 revision
If you get the error:
node_modules/cypress/node_modules/listr2/dist/renderer/default.renderer.js:7
const cliWrap = require("wrap-ansi");
^
Error [ERR_REQUIRE_ESM]: require() of ES Module node_modules/wrap-ansi/index.js from node_modules/cypress/node_modules/listr2/dist/renderer/default.renderer.js not supported.
Instead change the require of index.js in node_modules/cypress/node_modules/listr2/dist/renderer/default.renderer.js to a dynamic import() which is available in all CommonJS modules.
at Object.<anonymous> (node_modules/cypress/node_modules/listr2/dist/renderer/default.renderer.js:7:17)
at Object.<anonymous> (node_modules/cypress/node_modules/listr2/dist/utils/renderer.js:4:28)
at Object.<anonymous> (node_modules/cypress/node_modules/listr2/dist/lib/task.js:11:20)
at Object.<anonymous> (node_modules/cypress/node_modules/listr2/dist/listr.js:7:16)
at Object.<anonymous> (node_modules/cypress/node_modules/listr2/dist/index.js:13:14)
at Object.<anonymous> (node_modules/cypress/lib/tasks/install.js:10:5)
at Object.<anonymous> (node_modules/cypress/index.js:12:5) {
code: 'ERR_REQUIRE_ESM'
Then set resolutions in package.json
:
{
"resolutions": {
"wrap-ansi": "^7.0.0"
}
}