Skip to content

issue with windows NPM based installation #7089

@kri-kan

Description

@kri-kan

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriageThis issue needs to be triaged by a maintainer

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions