0

I am trying to deploy my Node.js ES6 modules-based application to Heroku, it works fine locally with npm start and also when I run heroku local web but unfortunately in the deployment it throws the error attached in the screenshot.

enter image description here

This is how my package.json looks like.

{
  "name": "",
  "private": true,
  "type": "module",
  "engines": {
    "node": "12.6.0"
  },
  "scripts": {
    "start": "node --experimental-modules index.js",
  },
  "dependencies": {
    ...

  },
  "devDependencies": {
    ...
  }
}

I have also tried by upgrading Node to 13.2.0 as suggested in this thread https://stackoverflow.com/a/59399717/5763627, but nothing changes with Heroku.

jonrsharpe
  • 115,751
  • 26
  • 228
  • 437
Divyanshu Rawat
  • 4,421
  • 2
  • 37
  • 53

0 Answers0