Comments (7)
Supposedly this can happen on Windows because of something to do with filename extensions: https://stackoverflow.com/questions/27688804/how-do-i-debug-error-spawn-enoent-on-node-js
I think that if you simply changed the cmd
to cmd.exe
on this line, the error might go away:
find-process/lib/find_process.js
Line 123 in 62c9211
from find-process.
@flotwig Is this not related to this issue? #9 Cypress is updating to the version that contains this fix, so it may fix this issue cypress-io/cypress#4087
from find-process.
@jennifer-shehane I don't think it's the same issue, this error was actually crashing the process
from find-process.
Supposedly this can happen on Windows because of something to do with filename extensions: https://stackoverflow.com/questions/27688804/how-do-i-debug-error-spawn-enoent-on-node-js
I think that if you simply changed the
cmd
tocmd.exe
on this line, the error might go away:find-process/lib/find_process.js
Line 123 in 62c9211
I don't have the environment to reproduce this issue, please verify if this change can fix the problem.
from find-process.
I haven't been able to reproduce it either :/
from find-process.
This actually seems to be happening when the user does not have C:\Windows\System32
in their PATH
:
- cypress-io/cypress#4260 (comment)
- cypress-io/cypress#3093 (comment)
- cypress-io/cypress#3912 (comment)
- https://stackoverflow.com/questions/28624686/get-spawn-cmd-enoent-when-try-to-build-cordova-application-event-js85
Would changing that line to the following be a good solution?
const proc = utils.spawn('C:\Windows\System32\cmd.exe', ['/c', cmd], { detached: false, windowsHide: true })
from find-process.
The error in windows is reproduced if the path to C:\Windows\System32 is missing in the system PATH variable.
The path can be restored in this way:
const CMDPath = path.resolve(env.WINDIR, path.sep+'system32');
const pathArray = (env?.PATH || '').split(path.delimiter);
pathArray.push(CMDPath);
process.env.PATH = pathArray.join(path.delimiter);
from find-process.
Related Issues (20)
- Cannot find by port on Arch Linux HOT 3
- Command name with whitespaces is truncated on Mac OS HOT 1
- Provide port details (if binded) for find process PID HOT 1
- Doesn't support UDP ports HOT 1
- Feature Request: Return port in found processes HOT 1
- Does not work in container HOT 2
- TypeError: Cannot read property 'endsWith' of undefined HOT 1
- Not return processes when value is a `regular expression` HOT 2
- Security issue HOT 3
- Check the process owner or any mapping between user and process before killing process in Node JS HOT 1
- windows系统中程序路径中有中文就会检测失败 HOT 3
- v1.4.5: Error: port must be a number HOT 1
- Upgrade to powershell on windows and Change Management HOT 2
- special characters in mac
- Matching by 'name' returns true if args field is empty
- Get-CimInstance is not available in older Powershell versions HOT 1
- How can I read the cpu usage of a process HOT 1
- Adding logging level configuration HOT 2
- [QUESTION]为什么不用tasklist来获取 HOT 2
- Allow search by multiple options of one type in one call HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from find-process.