2015-10-19 68 views
2

有沒有辦法使用PM2運行grunt serve? 這樣我就可以將我的環境設置爲在計算機啓動時自動啓動。啓動PM2的咕嚕服務

我發現是這樣的:

cd /path/to/project/ 
pm2 start grunt --name website -- serve 

但是,這似乎並沒有工作。看着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) 
+0

你找到任何解決方案來運行咕嚕PM2 –

回答

1

運行PM2開始咕嚕單獨爲我工作,仍不能解釋爲什麼雖然