title: Pm2 error while deploying Strapi App on DigitalOcean
body: <p>I've been following the official docs for deploying a Strapi app onto Digital ocean, but I'm having trouble setting up pm2.
  It starts the app for a second, and then shows</p>
  <pre><code>status: errored
  </code></pre>
  <p>there's no script.js to run the app, but when I cd to /home/myusername/appname/backend and run npm start, it works just fine, which leads me to believe that I have the ENV variables set correctly</p>
  <p>Here's the config file</p>
  <pre><code>module.exports = {
    apps: [
      {
        name: 'strapi',
        cwd: '/home/your-name/project/backend',
        script: 'npm',
        args: 'start',
        env: {
          NODE_ENV: 'production',
          DATABASE_HOST: 'localhost', // database endpoint
          DATABASE_PORT: '5432',
          DATABASE_NAME: 'strapi', // DB name
          DATABASE_USERNAME: 'your-name', // your username for psql
          DATABASE_PASSWORD: 'password', // your password for psql
        },
      },
    ],
  };
  </code></pre>
  <p>Then I run pm2 logs, I see</p>
  <pre><code>2020-07-13T01:58:49: PM2 log: App [strapi:0] online
  PM2        | 2020-07-13T01:58:49: PM2 error: Error: spawn node ENOENT
  PM2        |     at Process.ChildProcess._handle.onexit (internal/child_process.js:240:19)
  PM2        |     at onErrorNT (internal/child_process.js:415:16)
  PM2        |     at process._tickCallback (internal/process/next_tick.js:63:19)
  </code></pre>
  <p>Thanks</p>