Reputation: 355
When I create a dev container outside of Visual Studio Code and then I attach to a running container, often, but not all the times, I got the following error:
root@4fed72573fdd:/app# yarn dev
internal/modules/cjs/loader.js:818
throw err;
^
Error: Cannot find module '/root/.vscode-server/data/User/workspaceStorage/c8b7499a7d3347c27a0d7093feba1e49/ms-vscode.js-debug/bootloader.js'
Require stack:
- internal/preload
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:815:15)
at Function.Module._load (internal/modules/cjs/loader.js:667:27)
at Module.require (internal/modules/cjs/loader.js:887:19)
at Module._preloadModules (internal/modules/cjs/loader.js:1147:12)
at loadPreloadModules (internal/bootstrap/pre_execution.js:446:5)
at prepareMainThreadExecution (internal/bootstrap/pre_execution.js:74:3)
at internal/main/run_main_module.js:7:1 {
code: 'MODULE_NOT_FOUND',
requireStack: [ 'internal/preload' ]
}
root@4fed72573fdd:/app#
If I connect to the container via docker I am able to run yarn dev
, it is just inside Visual Studio Code remote containers terminal that it does not work.
Upvotes: 1
Views: 1272
Reputation: 105
I had a similar problem. It seems to be an Error with the Auto-attach feature of the Javascript debugger.
execute your node.js command
Upvotes: 1