I have the following launch.json file.
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch Serverless Offline",
"program": "${workspaceRoot}/node_modules/serverless/bin/serverless",
"args": ["offline", "start", "--httpPort", "4000", "--noTimeout"],
"protocol": "inspector",
"runtimeExecutable": "node",
"resolveSourceMapLocations": [
"${workspaceFolder}/**",
"!**/node_modules/**"
]
}
But I get the following error when I run the debugger from vs code. I do have both serverless and serverless-offline installed as a dev dependency.
Does the project structure has an impact on it. my node_modules folder is not the root folder.
And also included in the serverless.yml file.
Serverless Error ---------------------------------------Serverless command "offline" not found. Did you mean "config"? Run "serverless help" for a list of all available commands.