首页 > 解决方案 > 在 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)

有人可以帮我解决这个问题还是我可能做错了什么?

标签: node.jspm2strapi

解决方案


推荐阅读