node.jscompiler-errorsnodemonnode-api

Source: Microsoft JScript compilation error: While run nodejs project: WSH


Getting this error while run nodejs project. Following below commands.

nodemon --exec src/app.js
nodemon --exec src/server.js

Getting this error while run nodejs project

Below are the dependency

Dependancy


Solution

  • Here I have resolved the issue by installing ESM.

    npm install --save esm
    

    And then run

    node -r esm src/server.js