I am trying to test this serverless application but the Run and Debug function in VSC does not want to run it. I've tried numerous amount of pathing to the node modules but this does not change the outcome.
My configuration:
{
"type": "node",
"request": "launch",
"name": "invoke local",
"program": "/Users/MYNAME/.nvm/versions/node/v17.8.0/lib/node_modules/serverless/bin/serverless",
"args": [
"invoke",
"local",
"-f",
"${fileBasenameNoExtension}",
"-p",
"testEvents/${fileBasenameNoExtension}.json"
],
"cwd": "${fileDirname}/../",
"skipFiles": [
"<node_internals>/**/*.js",
"node_modules/**"
],
"env": { "AWS_PROFILE": "awsProfile" },
"outFiles": [
"${workspaceRoot}/**/*.js"
]
},
runs:
/Users/MYNAME/.nvm/versions/node/v17.8.0/bin/node ./../../../../../.nvm/versions/node/v17.8.0/lib/node_modules/serverless/bin/serverless invoke local -f fileName -p testEvents/FileName.json
which results in Process exited with code 1
When the same line is run terminal it returns the desired result.