I am using npm start script like this
"start": "cross-env NODE_PATH=. nodemon index.js"
and now I want to debug app with nodemon and my launch.json file configuration is like this
"type": "node",
"request": "launch",
"name": "nodemon",
"runtimeExecutable": "nodemon",
"program": "${workspaceFolder}/node-api-boilerplate/index.js",
"restart": true,
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen"
}
now I unable to understand that how to execute cross-env command. Please help me.
error is something like this
Cannot find module 'src/container'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:580:15)
at Function.Module._load (internal/modules/cjs/loader.js:506:25)
at Module.require (internal/modules/cjs/loader.js:636:17)
at require (internal/modules/cjs/helpers.js:20:18)
at Object.<anonymous> (E:\nodeProject\sailway education\node-api-boilerplate\index.js:1:81)
at Module._compile (internal/modules/cjs/loader.js:685:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
at Module.load (internal/modules/cjs/loader.js:598:32)
at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
at Function.Module._load (internal/modules/cjs/loader.js:529:3)
Waiting for the debugger to disconnect...
nodemon ${workspaceFolder}/node-api-boilerplate/index.js, so cross-env wont be even called in