使用pm2运行咖啡代码时出错:错误:spawn /usr/local/lib/node_modules/pm2/node_modules/.bin/coffee ENOENT
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了使用pm2运行咖啡代码时出错:错误:spawn /usr/local/lib/node_modules/pm2/node_modules/.bin/coffee ENOENT相关的知识,希望对你有一定的参考价值。
我将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
答案
为pm2运行安装coffeescript版本1
pm2 install coffee-script
要安装coffeescript版本2运行
pm2 install coffeescript
以上是关于使用pm2运行咖啡代码时出错:错误:spawn /usr/local/lib/node_modules/pm2/node_modules/.bin/coffee ENOENT的主要内容,如果未能解决你的问题,请参考以下文章