Ao executar o comando npx cypress run --reporter mochawesome ocorre o seguinte erro C:\Users\noils\cursoCypress>npx cypress run --reporter mochawesome
DevTools listening on ws://127.0.0.1:52314/devtools/browser/547911d0-b0ec-4297-a235-f4871063cf6b Your configFile is invalid: C:\Users\noils\cursoCypress\cypress.config.js
It threw an error when required, check the stack trace below:
ReferenceError: defineConfig is not defined at Object. (C:\Users\noils\cursoCypress\cypress.config.js:2:1) at Module._compile (node:internal/modules/cjs/loader:1101:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10) at Module.load (node:internal/modules/cjs/loader:981:32) at Function.Module._load (node:internal/modules/cjs/loader:822:12) at Module.require (node:internal/modules/cjs/loader:1005:19) at require (node:internal/modules/cjs/helpers:102:18) at loadFile (C:\Users\noils\AppData\Local\Cypress\Cache\13.3.0\Cypress\resources\app\node_modules@packages\server\l ib\plugins\child\run_require_async_child.js:89:14) at EventEmitter. (C:\Users\noils\AppData\Local\Cypress\Cache\13.3.0\Cypress\resources\app\node_modules@p ackages\server\lib\plugins\child\run_require_async_child.js:116:38) at EventEmitter.emit (node:events:390:28) at process. (C:\Users\noils\AppData\Local\Cypress\Cache\13.3.0\Cypress\resources\app\node_modules@packag es\server\lib\plugins\util.js:33:22) at process.emit (node:events:390:28) at emit (node:internal/child_process:917:12) at processTicksAndRejections (node:internal/process/task_queues:84:21)
C:\Users\noils\cursoCypress>npm i
up to date, audited 105 packages in 1s
20 packages are looking for funding
run npm fund
for details
found 0 vulnerabilities
C:\Users\noils\cursoCypress>npx cypress run --reporter mochawesome
DevTools listening on ws://127.0.0.1:52375/devtools/browser/25b744da-bbc6-4eec-8a3b-1ff06bf0efea Your configFile is invalid: C:\Users\noils\cursoCypress\cypress.config.js
It threw an error when required, check the stack trace below:
Error: Cannot find module 'cypress' Require stack:
- C:\Users\noils\cursoCypress\cypress.config.js
- C:\Users\noils\AppData\Local\Cypress\Cache\13.3.0\Cypress\resources\app\node_modules@packages\server\lib\plugins\chil d\run_require_async_child.js
- C:\Users\noils\AppData\Local\Cypress\Cache\13.3.0\Cypress\resources\app\node_modules@packages\server\lib\plugins\chil d\require_async_child.js at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15) at Function.Module._load (node:internal/modules/cjs/loader:778:27) at Module.require (node:internal/modules/cjs/loader:1005:19) at require (node:internal/modules/cjs/helpers:102:18) at Object. (C:\Users\noils\cursoCypress\cypress.config.js:1:26) at Module._compile (node:internal/modules/cjs/loader:1101:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10) at Module.load (node:internal/modules/cjs/loader:981:32) at Function.Module._load (node:internal/modules/cjs/loader:822:12) at Module.require (node:internal/modules/cjs/loader:1005:19) at require (node:internal/modules/cjs/helpers:102:18) at loadFile (C:\Users\noils\AppData\Local\Cypress\Cache\13.3.0\Cypress\resources\app\node_modules@packages\server\l ib\plugins\child\run_require_async_child.js:89:14) at EventEmitter. (C:\Users\noils\AppData\Local\Cypress\Cache\13.3.0\Cypress\resources\app\node_modules@p ackages\server\lib\plugins\child\run_require_async_child.js:116:38) at EventEmitter.emit (node:events:390:28) at process. (C:\Users\noils\AppData\Local\Cypress\Cache\13.3.0\Cypress\resources\app\node_modules@packag es\server\lib\plugins\util.js:33:22) at process.emit (node:events:390:28)