foreversd / forever-monitor

The core monitoring functionality of forever without the CLI
MIT License
1.16k stars 178 forks source link

forever -c option problem on window os #140

Open coconutperm opened 7 years ago

coconutperm commented 7 years ago

Hello,

I try to run with nodemon and forever using -c option. but, it occur ENOENT error to 'nodemon' using -c option.

So, I found a problem like below. child-process module use win-bash script on window os. it should use full file name to bash script like 'nodemon.cmd' if run some command.

So, I try to run with full command like 'forever start -c nodemon.cmd ./main.js'. But It occur same error like below.

Error: spawn nodemon ENOENT at exports._errnoException (util.js:1022:11) at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32) at onErrorNT (internal/child_process.js:359:16) at _combinedTickCallback (internal/process/next_tick.js:74:11) at process._tickCallback (internal/process/next_tick.js:98:9)

Finally I found a additional problem to monitor.js

So, I will fix regex and pull request. Please review my request.

Refer Window path: node_modules/.bin node_modules.bin\nodemon node_modules.bin\nodemon.cmd

@romandev

toficofi commented 7 years ago

This is caused by https://github.com/nodejs/node-v0.x-archive/issues/2318 As a workaround, add spawnWith: {shell: true} to your config.