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

issue with windows NPM based installation #7089

Open
1 of 2 tasks
kri-kan opened this issue Nov 23, 2024 · 4 comments
Open
1 of 2 tasks

issue with windows NPM based installation #7089

kri-kan opened this issue Nov 23, 2024 · 4 comments
Labels
bug Something isn't working triage This issue needs to be triaged by a maintainer

Comments

@kri-kan
Copy link

kri-kan commented Nov 23, 2024

Is there an existing issue for this?

  • I have searched the existing issues

OS/Web Information

Web Browser:Chrome

  • Local OS:Windows 11
  • Remote OS:same machine
  • Remote Architecture:
  • code-server --version
    4.95.3

Steps to Reproduce

1.npm install code-server
2.open in browser
3.seeing this error

Image

[2024-11-23T11:24:07.616Z] info Wrote default config file to C:\Users\Administrator\AppData\Roaming\code-server\Config\config.yaml
[2024-11-23T11:24:07.928Z] info code-server 4.95.3 b0c935a
[2024-11-23T11:24:07.929Z] info Using user-data-dir C:\Users\Administrator\AppData\Local\code-server\Data
[2024-11-23T11:24:07.935Z] warn Could not create socket at C:\Users\Administrator\AppData\Local\code-server\Data\code-server-ipc.sock
[2024-11-23T11:24:07.940Z] info Using config file C:\Users\Administrator\AppData\Roaming\code-server\Config\config.yaml
[2024-11-23T11:24:07.940Z] info HTTP server listening on http://127.0.0.1:8080/
[2024-11-23T11:24:07.940Z] info - Authentication is enabled
[2024-11-23T11:24:07.940Z] info - Using password from C:\Users\Administrator\AppData\Roaming\code-server\Config\config.yaml
[2024-11-23T11:24:07.940Z] info - Not serving HTTPS
[2024-11-23T11:24:07.940Z] info Session server listening on C:\Users\Administrator\AppData\Local\code-server\Data\code-server-ipc.sock
[2024-11-23T11:24:21.513Z] error CodeServerRouteWrapper: Only URLs with a scheme in: file, data, and node are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'c:' Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only URLs with a scheme in: file, data, and node are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'c:'
at new NodeError (node:internal/errors:406:5)
at throwIfUnsupportedURLScheme (node:internal/modules/esm/load:216:11)
at defaultLoad (node:internal/modules/esm/load:118:3)
at ModuleLoader.load (node:internal/modules/esm/loader:396:13)
at ModuleLoader.moduleProvider (node:internal/modules/esm/loader:278:56)
at new ModuleJob (node:internal/modules/esm/module_job:65:26)
at #createModuleJob (node:internal/modules/esm/loader:290:17)
at ModuleLoader.getJobFromResolveResult (node:internal/modules/esm/loader:248:34)
at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:229:17)
at async ModuleLoader.import (node:internal/modules/esm/loader:315:23)

Expected

doesnt load code editor

Actual

expected to show code editor

Logs

Screenshot/Video

No response

Does this bug reproduce in native VS Code?

This cannot be tested in native VS Code

Does this bug reproduce in GitHub Codespaces?

No, this works as expected in GitHub Codespaces

Are you accessing code-server over a secure context?

  • I am using a secure context.

Notes

No response

@kri-kan kri-kan added bug Something isn't working triage This issue needs to be triaged by a maintainer labels Nov 23, 2024
@Yakraii
Copy link

Yakraii commented Nov 24, 2024

I encountered the same issue.

@code-asher
Copy link
Member

Does this only happen when code-server is hosted on Windows? Or does it happen when accessing from Windows, even if hosted on Linux?

We do not have support for running the server on Windows yet, but we do support accessing from Windows.

@kri-kan
Copy link
Author

kri-kan commented Nov 26, 2024

It's both hosted and accessed on windows. In documentation I see there is a suggested approach using npm on windows, Is that not working yet?

@code-asher
Copy link
Member

Good point, I am not sure when or why that section was added since we are not currently testing on Windows. Sorry for the misleading documentation!

I think it is possible it used to work and someone added that section, but something might have broke when VS Code switched to ESM. We really need to add Windows builds and tests to CI to make sure we have proper support.

Tracking for Windows support is here: #1397

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage This issue needs to be triaged by a maintainer
Projects
None yet
Development

No branches or pull requests

3 participants