0

Working with a React app and trying to start it with pm2, but when I write the command:

pm2 start ecosystem.config.json

it starts the app, but it is errored. When I write pm2 logs it says

import '@progress/kendo-theme-default/dist/all.css';
9|reactApp | ^^^^^^
9|reactApp |
9|reactApp | SyntaxError: Cannot use import statement outside a module

What can I do?

My ecosystem.config.json file:

{
  "apps" : [{
    "name"        : "reactApp",
    "cwd"         : "./src",
    "script"      : "App.js"

  }]
}

My react app folder (App.js is inside the /src directory): enter image description here

OmarLittle
  • 423
  • 1
  • 9
  • 18

0 Answers0