Is there a way to run grunt serve
using PM2?
This way I could set up my environment to automatically start when my computer start up.
I found something like:
cd /path/to/project/
pm2 start grunt --name website -- serve
But that doesn't seem to work. I am getting the following error when looking at pm2 logs
:
PM2: 2015-10-19 18:23:44: Script C:\Users\...\AppData\Roaming\npm\grunt had too many unstable restarts (15). Stopped. "errored"
grunt-0 (err): at Module._compile (module.js:413:25)
grunt-0 (err): at Object.Module._extensions..js (module.js:452:10)
grunt-0 (err): at Module.load (module.js:355:32)
grunt-0 (err): at Function.Module._load (module.js:310:12)
grunt-0 (err): at Function._load (C:\Users\cltessie\AppData\Roaming\npm\node_modules\pm2\node_modules\pmx\lib\transaction.js:62:21)
grunt-0 (err): at Object.<anonymous> (C:\Users\cltessie\AppData\Roaming\npm\node_modules\pm2\lib\ProcessContainerFork.js:28:21)
grunt-0 (err): at Module._compile (module.js:434:26)
grunt-0 (err): at Object.Module._extensions..js (module.js:452:10)
grunt-0 (err): at Module.load (module.js:355:32)
grunt-0 (err): SyntaxError: Unexpected token case
grunt-0 (err): at exports.runInThisContext (vm.js:53:16)
grunt-0 (err): at Module._compile (module.js:413:25)
grunt-0 (err): at Object.Module._extensions..js (module.js:452:10)
grunt-0 (err): at Module.load (module.js:355:32)
grunt-0 (err): at Function.Module._load (module.js:310:12)
grunt-0 (err): at Function._load (C:\Users\cltessie\AppData\Roaming\npm\node_modules\pm2\node_modules\pmx\lib\transaction.js:62:21)
grunt-0 (err): at Object.<anonymous> (C:\Users\cltessie\AppData\Roaming\npm\node_modules\pm2\lib\ProcessContainerFork.js:28:21)
grunt-0 (err): at Module._compile (module.js:434:26)
grunt-0 (err): at Object.Module._extensions..js (module.js:452:10)
grunt-0 (err): at Module.load (module.js:355:32)