-
-
Notifications
You must be signed in to change notification settings - Fork 67
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
Writing commit message (c c
), Loading "original-fs" failed
#303
Comments
Same here, but using MacOS and Remote SSH extension 🥺 |
just started experiencing this - probably a vscode update, as edamagit hasn't changed since spring this year maybe related? microsoft/vscode-remote-release#188 |
i also run into this issue. for me i happens when working in a devcontainer. Stacktrace is the same as from mdboom. |
FWIW happens on rebasing as well. |
i do all my development in devcontainers (or at least wsl or remote), but i tried to commit direct on windows with edamagit - and that still works. this makes me suspect the error is within the vscode server? |
I'm stuck with this problem with WSL and devcontainers after vscode was updated to v1.92. As mentioned above, the problem seems to be that extensions cannot use the original-fs module when running on the remote server, they should fall back on using fs. A fix for this issue would be greatly appreciated. |
This change addresses kahole#303, preventing commit messages from being written in remote hosts. In VSCode's `server-cli.js`, it checks for the `ELECTRON_RUN_AS_NODE` environment variable, and if it's present it maps the `fs` module to point to the `original-fs` module: ```javascript (process.env.ELECTRON_RUN_AS_NODE || process.versions.electron) && c.define("fs", ["original-fs"], function (r) { return r; }), ``` This module is present in Electron, but not in base NodeJS; base NodeJS is what's used by the VSCode remote server, so having this environment variable present when `code` is called from a subprocess will cause failure. An alternative, but more involved, fix here might be to move to using `ShellExecution` or `ProcessExecution` rather than `child_process`; I expect that they will support calling `code` from a nested process, but they have a fairly different API.
while we're waiting for a new release - here's a version i built myself with the fix by @RichardDRJ (putting it here mostly to find it myself when i'm on a different computer) |
Thank you for providing a fixed version, I'm also using it for now. 👍 |
Thanks @TomasEkeli for providing a fixed pre-release. I just checked with an installation in a dev container / working remotely and it works for me too:
|
seems to be fixed now |
yes, this was fixed in the most recent release. the issue can be closed |
awesome! thanks! |
Recently, I've run into this error when trying to create a commit message (
c c
).Version: 1.92.0-insider (user setup)
Commit: bcbdd8e575684d6df1def9a478d645c37129c033
Date: 2024-07-25T23:12:28.613Z
Electron: 30.1.2
ElectronBuildId: 9870757
Chromium: 124.0.6367.243
Node.js: 20.14.0
V8: 12.4.254.20-electron.0
OS: Windows_NT x64 10.0.22631
edamagit: v0.6.61
This is on Windows, connecting to a WSL "remote".
The text was updated successfully, but these errors were encountered: