5

I am trying to run the follwowing npm script in Visual Studio code's launch.json file:

nodemon src/shim-host/index.js --exec babel-node --babel-preset-es2015

My attempt so far in my launch.json file:

"program": "nodemon src/shim-host/index.js --exec babel-node --babel-preset-es2015",

However, I am getting the error "Attribute 'program' is not absolute'"

Can someone help?

Thanks in advance!

1 Answer 1

6

The program attribute is your code and nodemon should be the runtimeExecutable.

Example from Visual Studio Code documentation:

{
    "name": "Launch server.js via nodemon",
    "type": "node",
    "request": "launch",
    "cwd": "${workspaceRoot}",
    "runtimeExecutable": "nodemon",
    "runtimeArgs": [
        "--debug=5858"
    ],
    "program": "${workspaceRoot}/server.js",
    "restart": true,
    "port": 5858,
    "console": "integratedTerminal",
    "internalConsoleOptions": "neverOpen"
}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.