How can I configure Heroku to have the flag --experimental-modules supplied to the Node.js executable to ensure I can use native modules in my JavaScript?
1 Answer
I also had this problem and solved it by adding a start script in the package.json file of my application as below:
"scripts": {
…
"start": "node --experimental-modules index.mjs ",
…
}
For more details, see the topic "Specifying a start script" in Specifying a start script.