-
-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cucumber-json-formatter for macOS is not working (cucumber-json-formatter ENOENT) #24
Comments
I have same issue on Mac |
I am trying to migrate cypress to 10+, but I am getting an error while creating the cucumber report as below on M1 mac, could anyone please help me with it. 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) Have the same issue like above Thank you! |
FYI, this project and its authors have no relationship with Cypress nor the cypress-cucumber-preprocessor. The errors mentioned here indicated that you have not successfully made the executable available in your |
@badeball Thanks for the update,
I did the samething on windows, its working fine, but facing this issue on mac Thank you! |
Hi. I have been trying to get the cucumber-json-formatter working on my MacBook. I have been using the instructions on their GitHub page - https://github.com/cucumber/json-formatter I followed these steps (as suggested on the GitHub page):- MacOS
When I run the command in step 4. I get the following error:- Further information - I am doing this on a M1 MacBook. |
@ashort-zaizi I have an M1 Mac and what I needed to do for step 4 to work was manually opening the Besides that, make sure to open a new terminal session to read your updated |
Hi a8rejo. When you say manually open the cucumber-json-formatter, what do you mean? Double click on the file? |
Hi @a8trejo I double clicked on the cucumber-json-formatter file, and allowed the permission, but the error is the same. |
@ashort-zaizi yes, as @adinizs did If it helps for reference, this is what I do on a Github Actions workflow to get it working too,
Note: the |
as for how to set the folder where
|
I set this information in my .zprofile, but the error is the same. @a8trejo
|
@adinizs also close and reopen Visual Studio or the terminal so it reads the system variable again, if that still doesn't work, I'm out of ideas ^^ |
@adinizs what is the output of your |
I got it!! Steps for success: MacOS
Thank you @a8trejo !! |
happy to help! :D |
I am able to solve it after following adinizs steps. adinizs thanks! |
I have added cucumber-json-formatter to my PATH . I have updated my system preferences to allow my MacBook to open the cucumber-json-formatter executable. When I open a terminal window and run the following command :-- I can see that I have configured my PATH variable correctly as I see this response in the terminal window:- When I open VSCode and open a terminal window within VSCode and run the following command:- I get this response:- I have tried closing and re-opening VSCode, but I see the same error. Im very confused in what to do now. Any help would be much appreciated. Thanks! |
I found the problem!! in macOS we need to create a .bash_profile file, in this file we need to add environmental variables and add macOS path. Maybe I don't describe very well the solution but I gonna attach a imag Steps:
2.Create file .bash_profile (/Users/your user)
|
It depends on your MAC Operating system, Make sure the system variable How to update the system variable |
FIX: Have stumbled a similar problem when I was following a certain course. and the ENOENT error will not persist anymore inside the terminal after running |
@KShewengger thank you, thank you!! |
Hello @badeball, Firstly, many thanks for your helping library which is very useful. I have followed exact steps but couldn't generate json file on my mac and also on linux. I have also followed all above suggestions but no luck, please can you help as I'm currently blocked :(? Below are details from my mac and our project is mono repo project. @adinizs @KShewengger I have followed your steps too but no luck. Please help if you can. Package.json Formatter is present at root folder PATH Variable Added in .bash_profile Result from command Debug log DevTools listening on ws://127.0.0.1:52532/devtools/browser/6d6f2fb9-1346-48bb-8097-555a1c01e87f ==================================================================================================== (Run Starting) ┌────────────────────────────────────────────────────────────────────────────────────────────────┐ cypress-cucumber-preprocessor beforeRunHandler() +2s ──────────────────────────────────────────────────────────────────────────────────────────────────── Running: upl-e2e-journeys.feature (1 of 1) End to End Regression Test Scenarios 1 passing (215ms) cypress-cucumber-preprocessor afterSpecHandler() +17ms (Results) ┌────────────────────────────────────────────────────────────────────────────────────────────────┐ ==================================================================================================== (Run Finished)
┌────────────────────────────────────────────────────────────────────────────────────────────────┐ |
Hi @PavanGurram-DevOps, I recommend that you use the latest version of |
Thanks @badeball for the response. I have resolved it just now. The issue is not with the version, it is with multiple plugins in cypress.config.js file and I ahve seen one more closed ticket which mentions to use cypress-on-fix library. It would have been easier and time saving if this is mentioned in the documentation itslef so that it would have saved many hours of mine :) But thats fine, the solution worked which is what needed. Thanks again for your nice work :) |
Many thanks @badeball . You are awesome :) |
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}"
]
}
The text was updated successfully, but these errors were encountered: