【问题标题】:PM2 starting Meteor App not workingPM2 启动 Meteor App 不工作
【发布时间】:2018-05-04 08:41:08
【问题描述】:

我在一个 Digital Ocean Linux Ubuntu 16.041 droplet 中有一个 Meteor 应用程序的实例。此外,我安装了 Node.js 版本的 4.4.0

我在路径 ~/MyApplication/bundle 上创建了相应的包。事实上,我使用 config.json 文件自动执行其主体包含以下代码:

我的 main.js 文件是从 Meteor build --directory ~/myDirectory/ 命令创建的,包含以下代码:

process.argv.splice(2, 0, 'program.json'); process.chdir(require('path').join(__dirname, 'programs', 'server')); require('./programs/server/boot.js');

话虽如此,我使用 pm2 通过带有 pm2 start config.json 的配置 JSON 文件运行我的应用程序

它启动了应用程序,但几毫秒后它出错了。日志错误显示以下有关拼写错误的异常,但似乎 mainjs 文件创建得很好。有什么解决办法吗?

【问题讨论】:

    标签: node.js ubuntu meteor digital-ocean pm2


    【解决方案1】:

    最后,我不得不将服务器中的节点版本从 4.4.0 更新到 8.9.1。完成这些更改后,我还必须使用 npm install 在 bundle/programs/server/ 中安装依赖项

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-12-26
      • 2016-06-05
      • 2016-08-02
      • 1970-01-01
      • 2015-12-23
      • 2022-07-18
      • 2017-12-04
      • 2019-07-18
      相关资源
      最近更新 更多