Jenkins Error "Error: spawn cmd ENOENT"
See original GitHub issueHi, I’m running Cypress on Jenkins in Windows and am experiencing strange behavior. When I first setup Cypress to run in a build, it ran fine, but every time after that, it fails with Error: spawn cmd NOENT
Also, I changed the user that Jenkins runs as and Cypress ran only the first time the build ran, but after the first run, I get the same errors.
Current behavior:
Opening Cypress…
{ Error: spawn cmd ENOENT
at exports._errnoException (util.js:1024:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:192:19)
at onErrorNT (internal/child_process.js:374:16)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
code: 'ENOENT',
errno: 'ENOENT',
syscall: 'spawn cmd',
path: 'cmd',
spawnargs:
[ '/c',
'WMIC path win32_process get Name,Processid,ParentProcessId,Commandline' ] }
Error: spawn cmd ENOENT
at exports._errnoException (util.js:1024:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:192:19)
at onErrorNT (internal/child_process.js:374:16)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
[?25hBuild step 'Execute Windows batch command' marked build as failure
Finished: FAILURE
Desired behavior:
I would like Cypress to run my tests inside of headless mode.
Steps to reproduce: (app code and test code)
I don’t have a public repo to recreate this. If need, I could let somebody take a look at my build server. I’m just executing ./node_modules/.bin/cypress run
from a windows batch command inside of Jenkins.
Versions
Windows Server 2016 Cypress 3.2.0 Jenkins latest
Issue Analytics
- State:
- Created 4 years ago
- Comments:23 (9 by maintainers)
Top Results From Across the Web
Problem with npm start (error : spawn cmd ENOENT)
Go to search bar and write environment variables. You should see an option to called edit system environment variables or something similar.
Read more >Common errors | npm Docs
The error Error: ENOENT, stat 'C:\Users\<user>\AppData\Roaming\npm' on Windows 7 is a consequence of joyent/node#8141, and is an issue with the Node installer ...
Read more >Fatal error: spawn cmd ENOENT when I try to build /test with ...
The error occurs when I run the grunt command, in the “jsdoc:dist” (jsdoc) task (so I think the project is “jsdoc”).
Read more >Webdriver-Manager Won'T Start - Error: Spawn Cmd Enoent
If you ever get this error the hotfix is to follow these steps: delete nodemodules folder; run command npm cache clean force; run...
Read more >How to fix: npm ERR! enoent ENOENT: no such file or ...
If you ever get this error, the hotfix is to follow these steps: ... It should all work fine after that. If these...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Not sure if it’s relevant but I’m having the same error when trying to integrate Cypress with Percy on macos:
here’s the script: “cypress:headless”: “./node_modules/.bin/cypress run” I changed it to: “cypress:headless”: “cypress run”
It gets me to the same spot (error)