【问题标题】:Error running coffee code with pm2: Error: spawn /usr/local/lib/node_modules/pm2/node_modules/.bin/coffee ENOENT使用 pm2 运行咖啡代码时出错:错误:spawn /usr/local/lib/node_modules/pm2/node_modules/.bin/coffee ENOENT
【发布时间】:2019-04-04 11:51:29
【问题描述】:

在我将 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

【问题讨论】:

    标签: coffeescript pm2


    【解决方案1】:

    为 pm2 运行安装 coffeescript 版本 1

    pm2 install coffee-script
    

    安装 coffeescript 版本 2 运行

    pm2 install coffeescript
    

    【讨论】:

      猜你喜欢
      • 2019-01-15
      • 2019-08-15
      • 1970-01-01
      • 1970-01-01
      • 2018-08-01
      • 1970-01-01
      • 2020-10-25
      • 1970-01-01
      • 2020-09-05
      相关资源
      最近更新 更多