Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code fails to launch from Git Bash Windows 11 #187392

Closed
RyanJMoore10 opened this issue Jul 9, 2023 · 2 comments
Closed

Code fails to launch from Git Bash Windows 11 #187392

RyanJMoore10 opened this issue Jul 9, 2023 · 2 comments
Assignees

Comments

@RyanJMoore10
Copy link

RyanJMoore10 commented Jul 9, 2023

Type: Bug

Running Git bash in Windows Terminal, (base) conda environment is active.
Command code . returns the following error:

node:internal/modules/cjs/loader:1013
  throw err;
  ^

Error: Cannot find module 'C:\ProgramData\Anaconda3\Library\c\Users\mryan\AppData\Local\Programs\Microsoft VS Code\resources\app\out\cli.js'
    at Module._resolveFilename (node:internal/modules/cjs/loader:1010:15)
    at Module._load (node:internal/modules/cjs/loader:858:27)
    at f._load (node:electron/js2c/asar_bundle:2:13330)
    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: []
}

For some reason, the module search is appending "C:\ProgramData\Anaconda3\Library" to the beginning of the correct search path.

I can temporarily fix this by commenting out lines 56 and 57 in this file:
C:\Users\mryan\AppData\Local\Programs\Microsoft VS Code\bin\code

# elif [ -x "$(command -v cygpath)" ]; then
# 	CLI=$(cygpath -m "$VSCODE_PATH/resources/app/out/cli.js")

VS Code version: Code 1.80.0 (660393d, 2023-07-04T15:06:02.407Z)
OS version: Windows_NT x64 10.0.22621
Modes:

System Info
Item Value
CPUs 11th Gen Intel(R) Core(TM) i7-11700 @ 2.50GHz (16 x 2496)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
Load (avg) undefined
Memory (System) 15.58GB (5.24GB free)
Process Argv C:\Users\mryan\AppData\Local\Programs\Microsoft VS Code\bin\code --crash-reporter-id 1f21ec64-e919-493f-806e-90099a4b264c
Screen Reader no
VM 0%
Extensions (19)
Extension Author (truncated) Version
gc-excelviewer Gra 4.2.57
rainbow-csv mec 3.7.0
vscode-docker ms- 1.25.2
isort ms- 2023.10.0
python ms- 2023.12.0
vscode-pylance ms- 2023.7.10
jupyter ms- 2023.6.1001861915
jupyter-keymap ms- 1.1.2
jupyter-renderers ms- 1.0.17
vscode-jupyter-cell-tags ms- 0.1.8
vscode-jupyter-slideshow ms- 0.1.5
remote-containers ms- 0.299.0
remote-wsl ms- 0.80.2
material-icon-theme PKi 4.28.0
synthwave-vscode Rob 0.1.15
intellicode-api-usage-examples Vis 0.2.7
vscodeintellicode Vis 1.2.30
markdown-all-in-one yzh 3.5.1
material-theme zhu 3.15.18

(3 theme extensions excluded)

A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
vserr242:30382549
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
vscod805cf:30301675
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593:30376534
pythonvs932:30410667
py29gd2263cf:30784848
vsclangdc:30486549
c4g48928:30535728
dsvsc012cf:30540253
pynewext54:30695312
azure-dev_surveyone:30548225
vsccc:30610678
3biah626:30602489
pyind779:30671433
f6dab269:30613381
vscrp:30673768
pythonsymbol12:30671437
a9j8j154:30646983
showlangstatbar:30737416
vsctsb:30748421
pythonms35:30701012
03d35959:30757346
pythonfmttext:30731395
pythoncmvfstrcf:30756944
fixshowwlkth:30771522
showindicator:30785052
pythongtdpath:30769146
bgfeh915:30780428
pythonnosm12tcf:30779713
pythonidxpt:30784022
pythonnoceb:30776495
dsvsc013:30784100

@connor4312 connor4312 assigned joaomoreno and unassigned connor4312 Jul 10, 2023
@joaomoreno joaomoreno added bug Issue identified by VS Code Team member as probable bug help wanted Issues identified as good community contribution opportunities labels Jul 11, 2023
@joaomoreno joaomoreno added this to the Backlog milestone Jul 11, 2023
@andhrelja
Copy link

andhrelja commented Jul 26, 2023

I had the same issue on my Windows 10 machine. I was able to work around this issue by editing %USERPROFILE%\.bash_profile to comment-out the line eval "$('%USERPROFILE%/anaconda3/Scripts/conda.exe' 'shell.bash' 'hook')".

My Git Bash now recognizes code invocations

@joaomoreno
Copy link
Member

Closing with workaround. ✅

@joaomoreno joaomoreno closed this as not planned Won't fix, can't repro, duplicate, stale Jul 26, 2023
@joaomoreno joaomoreno removed bug Issue identified by VS Code Team member as probable bug help wanted Issues identified as good community contribution opportunities labels Jul 26, 2023
@joaomoreno joaomoreno removed this from the Backlog milestone Jul 26, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Sep 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants