I'm developing on OSX and Windows. Everything was working fine over the weekend but at work, I'm confronted with the following error while running my debug config.
internal/modules/cjs/loader.js:583
throw err;
^
Error: Cannot find module '"/Applications/Visual'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
at Function.Module._load (internal/modules/cjs/loader.js:507:25)
at Module.require (internal/modules/cjs/loader.js:637:17)
at Module._preloadModules (internal/modules/cjs/loader.js:812:12)
at preloadModules (internal/bootstrap/node.js:599:7)
at startup (internal/bootstrap/node.js:273:9)
at bootstrapNodeJSCore (internal/bootstrap/node.js:743:3)
Running npm run serve in the nested directory works fine so this leads me to believe I have misconfigured my launch.json. I've also tried reinstalling node, deleting my node_modules and package_lock.json
launch.json
{
"version": "0.2.0",
"configurations": [
{
"name": "rpr-app",
"request": "launch",
"runtimeArgs": [
"run-script",
"serve"
],
"runtimeExecutable": "npm",
"skipFiles": [
"<node_internals>/**"
],
"type": "pwa-node",
"cwd": "${workspaceFolder}/rpr-app",
"outputCapture": "std",
"serverReadyAction":{
"action": "openExternally",
"pattern": "App running at",
"uriFormat": "http://localhost:8080"
}
},
{
"type": "node",
"request": "launch",
"name": "rpr-api",
"runtimeExecutable": "npm",
"runtimeArgs": [
"run-script",
"dev"
],
"port": 9229,
"skipFiles": [
"<node_internals>/**"
],
"envFile": "${workspaceFolder}/.env",
"outputCapture": "std",
"cwd":"${workspaceFolder}/rpr-api"
}
],
"compounds": [
{
"name": "Dev Server/Client",
"configurations": ["rpr-api", "rpr-app"]
// "preLaunchTask": "${defaultBuildTask}"
}
]
}