PM2 启动 Meteor App 不工作
PM2 starting Meteor App not working
我在一个 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 通过配置 JSON 文件 pm2 start config.json
它启动应用程序,但几毫秒后出现错误。日志错误显示以下有关拼写错误的异常,但似乎 mainjs 文件创建正常。有什么建议可以解决吗?
最后,我不得不将服务器中的节点版本从 4.4.0 更新到 8.9.1。完成这些更改后,我还必须使用 npm install
在 bundle/programs/server/ 中安装依赖项
我在一个 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 通过配置 JSON 文件 pm2 start config.json
它启动应用程序,但几毫秒后出现错误。日志错误显示以下有关拼写错误的异常,但似乎 mainjs 文件创建正常。有什么建议可以解决吗?
最后,我不得不将服务器中的节点版本从 4.4.0 更新到 8.9.1。完成这些更改后,我还必须使用 npm install