[bug]The Codex extension for VS Code doesn’t use the Node.js version set in the system environment variables.
Open 💬 3 comments Opened Nov 29, 2025 by cheezmil
What version of the VS Code extension are you using?
0.5.46
What subscription do you have?
team
Which IDE are you using?
vscode
What platform is your computer?
Microsoft Windows NT 10.0.22631.0 x64
What issue are you seeing?
$ powershell.exe -Command 'node start_fe_dev_xdx_toolbox.mjs'
正在设置终端编码为 UTF-8...
终端编码已设置为 UTF-8。
chcp 65001 命令输出: Active code page: 65001
确认 chcp 命令输出: Active code page: 65001
正在以前端开发模式启动项目...
> xdx_toolbox@0.0.0 dev
> chcp 65001 && vite
Active code page: 65001
^[[36mvite v5.4.21 ^[[32mbuilding for development...^[[36m^[[39m
^[[36m
watching for file changes...^[[39m
^[[36mvite v5.4.21 ^[[32mbuilding for development...^[[36m^[[39m
^[[36m
watching for file changes...^[[39m
^[[32m^[[1mVITE^[[22m v5.4.21^[[39m ^[[2mready in ^[[0m^[[1m1053^[[22m^[[2m^[[0m ms^[[22m
^[[32m➜^[[39m ^[[1mLocal^[[22m: ^[[36mhttp://localhost:^[[1m1088^[[22m/^[[39m
^[[2m ^[[32m➜^[[39m ^[[1mNetwork^[[22m^[[2m: use ^[[22m^[[1m--host^[[22m^[[2m to expose^[[22m
^[[36m
build started...^[[39m
^[[36m
build started...^[[39m
transforming...
transforming...
^[[32m✓^[[39m 1 modules transformed.
rendering chunks...
computing gzip size...
^[[2mdist-electron/^[[22m^[[36mpreload.js ^[[39m^[[1m^[[2m2.60 kB^[[22m^[[1m^[[22m^[[2m │ gzip: 0.79 kB^[[22m^[[2m │ map: 4.83 kB^[[22m
^[[36mbuilt in 156ms.^[[39m
^[[32m✓^[[39m 48 modules transformed.
rendering chunks...
computing gzip size...
^[[2mdist-electron/^[[22m^[[36mmain.js ^[[39m^[[1m^[[2m318.68 kB^[[22m^[[1m^[[22m^[[2m │ gzip: 184.36 kB^[[22m^[[2m │ map: 361.88 kB^[[22m
^[[36mbuilt in 682ms.^[[39m
file:///D:/CodeRelated/ElectronProjects/xdx_toolbox/FE/dist-electron/main.js:4
import { ipcMain, globalShortcut, app, BrowserWindow, nativeImage, Menu, Tray, clipboard } from "electron";
^^^^^^^^^^^^^
SyntaxError: The requested module 'electron' does not provide an export named 'BrowserWindow'
at ModuleJob._instantiate (node:internal/modules/esm/module_job:134:21)
at async ModuleJob.run (node:internal/modules/esm/module_job:217:5)
at async ModuleLoader.import (node:internal/modules/esm/loader:316:24)
at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:138:5)
Node.js v20.16.0
ERROR: The process "7000" not found.
前端开发进程已退出,退出码 1
The project throws an error because the Codex extension forces the use of a different Node.js version. When I open a new Windows Terminal or run npm run dev in VS Code’s built-in terminal myself, there’s no error at all.
What steps can reproduce the bug?
npm run dev
What is the expected behavior?
_No response_
Additional information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗