How to support async/await when running scripts using npm

because the version of node you are using does not support the async/await feature for the time being
if you run it on the command line and you want it to support the async/await function, it usually runs like this

node --harmony index.js

but if it is executed in npm, such as the following configuration

"scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "serve": "serve ."
  }
npm run serve

because the serve module uses the async/await function, it will report an error
so how can you easily turn on the function of-- harmony in the configuration file and try not to modify the information in the script configuration

Mar.23,2021

const { spawn } = require('child_process');
const ls = spawn('node', ['--harmony', 'index.js']);
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1ebeb89-487b7.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1ebeb89-487b7.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?