I am trying to debug my lambda function locally. I just followed the following instructions so I can use Visual Studio code.
But I am running into an error :
[INFO]: Error: NodejsNpmBuilder:Resolver - Path resolution for runtime: nodejs14.x of binary: npm was not successful
I am running NVM. I am not sure if this is related to my issue.
Below is my launch.json
{
"configurations": [
{
"type": "aws-sam",
"request": "direct-invoke",
"name": "employeedetails:app.lambdaHandler (nodejs14.x)",
"invokeTarget": {
"target": "code",
"projectRoot": "${workspaceFolder}/users",
"lambdaHandler": "app.lambdaHandler"
},
"lambda": {
"runtime": "nodejs14.x",
"payload": {},
"environmentVariables": {}
}
}
]
}
Please help.