vscode-js-debug icon indicating copy to clipboard operation
vscode-js-debug copied to clipboard

Error: Cannot find module '"/home/yuexianzhe/.vscode-server/data/User/workspaceStorage/618d54233b8f6b4518c079ea5c31382e/ms-vscode.js-debug/bootloader.js"'

Open yxzh614 opened this issue 6 years ago • 5 comments

Describe the bug

Error: Cannot find module '"/home/yuexianzhe/.vscode-server/data/User/workspaceStorage/618d54233b8f6b4518c079ea5c31382e/ms-vscode.js-debug/bootloader.js"'

after update v1.47(June 2020 (version 1.47)) ,this error shows in terminal when connect to my remote workspace

and when i use git push the error shows again, and the git push doesn't work

To Reproduce Steps to reproduce the behavior:

  1. open vscode
  2. using remote-ssh plugin to connet to my devbox
  3. open any folder
  4. See error in terminal (i paste it below)
  5. git push / node / nvm use v10 don't work,and show the same error
internal/modules/cjs/loader.js:638
    throw err;
    ^

Error: Cannot find module '"/home/yuexianzhe/.vscode-server/data/User/workspaceStorage/5e2d967e793adcbf9f94c31be991ac98/ms-vscode.js-debug/bootloader.js"'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
    at Function.Module._load (internal/modules/cjs/loader.js:562:25)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at Module._preloadModules (internal/modules/cjs/loader.js:901:12)
    at preloadModules (internal/bootstrap/node.js:602:7)
    at startup (internal/bootstrap/node.js:273:9)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)
internal/modules/cjs/loader.js:638
    throw err;
    ^

Error: Cannot find module '"/home/yuexianzhe/.vscode-server/data/User/workspaceStorage/5e2d967e793adcbf9f94c31be991ac98/ms-vscode.js-debug/bootloader.js"'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
    at Function.Module._load (internal/modules/cjs/loader.js:562:25)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at Module._preloadModules (internal/modules/cjs/loader.js:901:12)
    at preloadModules (internal/bootstrap/node.js:602:7)
    at startup (internal/bootstrap/node.js:273:9)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)

using code shows error too

$ code -r ~/.zshrc 
internal/modules/cjs/loader.js:626
    throw err;
    ^

Error: Cannot find module '/home/yuexianzhe/.vscode-server/data/User/workspaceStorage/5e2d967e793adcbf9f94c31be991ac98/ms-vscode.js-debug/bootloader.js'
Require stack:
- internal/preload
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:623:15)
    at Function.Module._load (internal/modules/cjs/loader.js:527:27)
    at Module.require (internal/modules/cjs/loader.js:681:19)
    at Module._preloadModules (internal/modules/cjs/loader.js:937:12)
    at loadPreloadModules (internal/bootstrap/pre_execution.js:392:5)
    at prepareMainThreadExecution (internal/bootstrap/pre_execution.js:53:3)
    at internal/main/run_main_module.js:7:1 {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ 'internal/preload' ]
}

VS Code Version: 1.47 os mac os 10.14.6 i try to switch auto attach on & off and it doesn't work also try to delete ./vscode-server on my remote,doesn't work too

yxzh614 avatar Jul 16 '20 07:07 yxzh614

ok , i find a plugin will cause this https://marketplace.visualstudio.com/items?itemName=be5invis.vscode-custom-css

error resolved by delete it

p.s. this plugin says need restart after any update of vscode

yxzh614 avatar Jul 16 '20 07:07 yxzh614

sorry error isnot resolved, i delete all the plugin and the error shows up too, now im using insider version, and there is no error

yxzh614 avatar Jul 16 '20 07:07 yxzh614

Please see here for the solution: https://github.com/microsoft/vscode/issues/102057#issuecomment-657728467

/duplicate

connor4312 avatar Jul 16 '20 14:07 connor4312

Hey @yxzh614 -- wanted to follow up here. When you hit this issue, do you recall whether you were using Node 10, or Node 12?

connor4312 avatar Aug 18 '20 15:08 connor4312

The solution given by @connor4312 in https://github.com/microsoft/vscode/issues/102057#issuecomment-657728467

  1. Run echo $VSCODE_INSPECTOR_OPTIONS | awk '{if(match($0, /"([^"]+.deferred)"/,m))print m[1]}' | xargs rm (deletes any orphaned 'auto attach socket' from disk)
  2. Reload the window
  3. Set debug.node.autoAttach to "on". Wait a moment.
  4. Set debug.node.autoAttach to "disabled". Wait a moment.
  5. Open a terminal and see if you're in a good state

Is still mostly true, however, new versions of vscode, as below

Version: 1.72.2 (user setup)
Commit: d045a5eda657f4d7b676dedbfa7aab8207f8a075
Date: 2022-10-12T22:15:18.074Z
Electron: 19.0.17
Chromium: 102.0.5005.167
Node.js: 16.14.2
V8: 10.2.154.15-electron.0
OS: Windows_NT x64 10.0.19044
Sandboxed: No

Don't appear to have debug.node.autoAttach as a setting anymore.

It appears to have instead been migrated to debug.javascript.autoAttachFilter.

The following should work

// Change it at one of these places
// https://code.visualstudio.com/docs/getstarted/settings#_settings-file-locations
// $HOME/.vscode-server/data/Machine/settings.json
// $HOME/.config/Code/User/settings.json
{
    // Uncomment then re-comment this line to fix the following:
    // Error: Cannot find module '/$HOME/.vscode-server/data/User/workspaceStorage/ /ms-vscode.js-debug/bootloader.js'
    //"debug.javascript.autoAttachFilter": "disabled"
}

strazto avatar Oct 27 '22 02:10 strazto