Closed johnsoftek closed 10 years ago
Service installed and paused? Or doesn't start when you start it? For start after instal '-a' flag needed.
It pauses immediately after being started.
On 16 August 2014 15:25, Pavel V. Sysolyatin notifications@github.com wrote:
Service installed and paused? Or doesn't start when you start it? For start after instal '-a' flag needed.
— Reply to this email directly or view it on GitHub https://github.com/jfromaniello/winser/issues/28#issuecomment-52384525.
This is work from console? without service?
Path to node exists in PATH for user from wich service starts?
"npm start" works from the console and, yes, node and npm are in the path (as shown by npm start just works)
If I use "nssm edit myservice" and change the command from "c:...\npm.cmd" to "node" and parameters from "start" to "server.js", the service starts and works perfectly.
I spent hours trying to get winser -i to work. Sorry, I can't give more feedback.
On 16 August 2014 17:22, Pavel V. Sysolyatin notifications@github.com wrote:
Path to node exists in PATH for user from wich service starts?
— Reply to this email directly or view it on GitHub https://github.com/jfromaniello/winser/issues/28#issuecomment-52386312.
try "install-windows-service": "winser -i --nonpm --startcmd=\"node server.js\"". This write "node" and parameters "server.js" for nssm. It think winser need ignore npm when startcmd is provided.
As I said in my first post, starting node directly does work, and you don't need --nonnpm:
"install-windows-service": "winser -i --startcmd=\"node server.js\"",
Default command changed to "node .."
Just ran into a similar problem at my office. We noticed a reference in npm-debug.log to a missing directory, and ended up working around it by creating the directory C:\Windows\System32\config\systemprofile\AppData\Roaming\npm
This allowed the service to start.
@Surreal9, that certainly fixed it for me. That definitely needs to be up on the README.
When I use the defaults, npm start does not work. The service pauses immediately.
Starting node directly does work.