-
Notifications
You must be signed in to change notification settings - Fork 947
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
Error running forever.js on Windows - “'C:\Program' is not recognized as an internal or external command, operable program or batch file” #1056
Comments
I've got the same problem. |
@sambragg If you type So, try the following instead:
|
@sunk818 thanks for your reply on this issue and on SO. I understand the issue now thanks to your explanation but how do I tell |
@sambragg I've never run node npm on Windows so I don't know from personal experience. https://stackoverflow.com/questions/27864040/fixing-npm-path-in-windows-8-and-10 if you run The other brute force way is run Process Monitor from sysinternals , filter on process name containing forever , and see how the software traverses through finding npm. I think getting stuff like this to run in Windows is painful. At least consider running on Ubuntu WSL (Windows for Subsystem Linux) in the future and see if you get better results. |
I am having this same problem. If you install version 1.0.0 it works. |
Yes,installing version 1.0.0 also worked for me |
I've just added a test that tries replicating this issue: #1068 That said, I'm pretty sure problem is caused by foreversd/forever-monitor#145, but would be great if I could have a reproduction to confirm before doing any changes, that hiding that change behind an option would indeed help. |
Windows 10:
hello.js: index.js: child.on('exit', function () { child.start();
result: Is there a workaround for this? Can I explicitly point to the node binary? |
What worked for me, since node.exe is in my path, i just used forever start -c node app.js and it started correctly. The other way is to change your system nodejs path to the short name (PROGRA~1) |
@sasodoma I got to this same conclusion before finding this thread. I ran into a problem doing it that way though, would you mind checking if you have the same problem? Once I started the daemon using -c node, when I used forever stopall, it failed to kill the child process for the script. So forever list says nothing is running, but the process for the script is still running in the background. I ended up downgrading as mentioned above to 1.0.1, but I'm curious if this was something others had issues with too. |
@foodbandlt Yes I had the exact same problem. My app was running and express server and socket.io. Running stopall didn't kill it and I also couldn't restart it because it wouldn't kill the old one and the the ports would clash. Also note that I don't think this is a problem with the -c option since I have tried the other way (using a short name in the PATH) and it still couldn't kill the process. |
The way it worked for me, in Windows, was to choose a folder to install to that does not contain a space. So Installed node to c:\ProgramFiles instead of c:\Program Files |
Why not just enclose the path in quotes? |
I'm having the same issue |
Can you try forever 3.0.0? |
Hi, I have the same issue with forever 2.0.0 on a Windows 10 PC... and I cannot upgrade "forever" because of an " No matching version found for forever-monitor@^4.0.1." error... My workaround (in the "forever.js" file): `
` |
I am trying to run
forever.js
via the Windows command prompt and I get the following output:>npm i -g forever
/my-project>forever start index.js
Log output:
'C:\Program' is not recognized as an internal or external command, operable program or batch file
I think it's something to do with the
PATH
thatforever
is using for thenode
binary, but I don't know how to fix it...Link to my question on Stack Overflow
The text was updated successfully, but these errors were encountered: