将pm2从2.1.5
升级到3.4.1
后,当我尝试启动/重新启动应用程序pm2 restart api
时开始出现以下错误:
PM2 | App [api:6] starting in -fork mode-
PM2 | App [api:6] online
PM2 | Error: spawn /usr/local/lib/node_modules/pm2/node_modules/.bin/coffee ENOENT
PM2 | at Process.ChildProcess._handle.onexit (internal/child_process.js:247:19)
PM2 | at onErrorNT (internal/child_process.js:431:16)
PM2 | at processTicksAndRejections (internal/process/task_queues.js:81:17)
PM2 | App [coffee:10] exited with code [0] via signal [SIGINT]
我尝试使用pm2 install coffee
为pm2安装咖啡,但这没有帮助-我在pm2 logs
中看到了很多:
PM2 | App [coffee:11] exited with code [0] via signal [SIGINT]
PM2 | App [coffee:11] starting in -fork mode-
PM2 | App [coffee:11] online
PM2 | App [coffee:11] exited with code [0] via signal [SIGINT]
PM2 | App [coffee:11] starting in -fork mode-
PM2 | App [coffee:11] online
答案 0 :(得分:0)
要为pm2安装coffeescript版本1
pm2 install coffee-script
要运行coffeescript版本2,请运行
pm2 install coffeescript