Error when executing code command on WSL

Asked 2 years ago, Updated 2 years ago, 123 views

Prerequisites

Setting the vscode path to .bashrc

PATH=$PATH:'/mnt/c/Users/xxxx/AppData/Local/Programs/Microsoft VS Code/bin'

code. results in the following error:
Please tell me how to deal with it.

Problems/Error Messages you are experiencing

node:internal/modules/cjs/loader:990
  below err;
  ^

Error: Cannot find module '\\wsl$\Ubuntu\mnt\c\Users\xxxx\AppData\Local\Programs\Microsoft VS Code.exe'
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:987:15)
    at Module._load (node: internal/modules/cjs/loader: 832:27)
    at Function.c._load (node:electron/js2c/asar_bundle:5:13343)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module: 17:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ ]
}

Tried

Reinstall vscode

vscode wsl

2022-09-30 19:49

1 Answers

I set the genie version to 2.3 by referring to the following in the comment, and it worked fine.
Thank you.

WSL2 VSCode Will Not Load After Ubuntu upgrade-Worked fine for 1 year !


2022-09-30 19:49

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.