After run the tests an error is displayed:
An error was thrown in your plugins file while executing the handler for the after:run event.
The error we received was:
Error: spawn cucumber-json-formatter ENOENT
at Process.ChildProcess._handle.onexit (node:internal/child_process:283:19)
at onErrorNT (node:internal/child_process:478:16)
at processTicksAndRejections (node:internal/process/task_queues:83:21)
I downloaded the file cucumber-json-formatter-darwin-amd64 and followed the steps as described in the readme, but this error is displayed.
Obs: I using macOS with apple silicon chip (M1)
My .cypress-cucumber-preprocessorrc.json file:
{
"json": {
"enabled": true,
"output": "jsonlogs/log.json",
"formater": "cucumber-json-formatter"
},
"messages": {
"enabled": true,
"output": "jsonlogs/messages.ndjson"
},
"stepDefinitions": [
"[filepath]/**/.{js,ts}",
"[filepath].{js,ts}",
"cypress/support/step_definitions/.{js,ts}"
]
}