node.js - 在 pm2 中获取生成节点 ENOENT
问题描述
我试图在 AWS 上设置strapi
我按照他们网站上列出的说明进行操作:https ://strapi.io/documentation/3.0.0-beta.x/deployment/amazon-aws.html
这是我的文件夹结构
这将是我的 ecoystem.config.js 文件
module.exports = {
apps: [
{
name: 'my-project',
cwd: '/home/ubuntu/Strapi',
script: 'npm',
args: 'start',
env: {
NODE_ENV: 'production',
DATABASE_HOST: 'r123-strapi-database.ce7f.us-east-2.rds.amazonaws.com', // database Endpoint under 'Connectivity & Security' tab
DATABASE_PORT: '5432',
DATABASE_NAME: 'r123_Strapi_db', // DB name under 'Configuration' tab
DATABASE_USERNAME: 'postgres', // default username
DATABASE_PASSWORD: 'r123_strapi_pasW',
},
},
],
};
aws Master 用户名是否等同于上面的 DATABASE_USERNAME?因为主用户名是 r123_strapi_101
当我运行时 pm2 start ecosystem.config.js
出现此错误
PM2 | 2020-09-07T20:04:11: PM2 error: Error: spawn node ENOENT
PM2 | at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19)
PM2 | at onErrorNT (internal/child_process.js:469:16)
PM2 | at processTicksAndRejections (internal/process/task_queues.js:84:21)
有人可以帮我解决这个问题还是我可能做错了什么?
解决方案
推荐阅读
- jquery - 如何使用 JQuery 和引导多步骤表单在 Laravel 中向控制器方法发布和请求数据?
- c++ - 根据运行时变量选择要调用的 C++ 模板
- javascript - 提交表单时,Sweet alert 不发送我的元素的 ID(ASP.Net 核心 mvc)
- angularjs - 科尔多瓦应用程序中的响应页面仅在真实手机上不响应
- android - Android:使用 SuperscriptSpan 时更改上标的垂直位置
- ruby-on-rails - 如何测试锁定机制
- odoo - Odoo:通过 CSV 更新 BOM 后重复的 BOM 行
- tomcat - 数据库连接数大于 DBCP maxTotal 设置的数
- vba - PowerPoint VBA 隐藏功能区
- ruby - 从 Localhost 到 Postfix 的 Ruby Mail Gem 中继访问