I'm running a job in gitlab CI and getting the following error when executing testcafe
command.
The tests do pass locally.
Error
spawn /builds/testcafe-reporter/node_modules/nightmare/node_modules/electron/dist/electron ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:268:19)
at onErrorNT (internal/child_process.js:470:16)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
Gitlab stage:
- yarn install --frozen-lockfile
- yarn add electron
- yarn testcafe:generatereport
package.json
{
"name": "testcafe-reporter",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"scripts": {
"testcafe:generatereport": "yarn testcafe ./testcafeReportGeneratorTest.ts"
},
"dependencies": {
"node-html-parser": "^4.1.4",
"testcafe": "1.16.0",
"testcafe-browser-provider-nightmare": "^0.0.5",
"testcafe-reporter-html": "^1.4.6",
"testcafe-reporter-html-testrail": "^3.1.5",
"typescript": "^4.4.2"
}
}
.testcafec.json
{
"browsers": ["nightmare"],
"reporter": {
"name": "html",
"output": "testcafe/reports/report.html"
}
}
Please advise how can I resolve this?