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

Support and publish Windows release #1397

Open
3 tasks
nhooyr opened this issue Mar 5, 2020 · 59 comments
Open
3 tasks

Support and publish Windows release #1397

nhooyr opened this issue Mar 5, 2020 · 59 comments
Labels
ci Issues related to ci enhancement Some improvement that isn't a feature os-windows Windows related
Milestone

Comments

@nhooyr
Copy link
Contributor

nhooyr commented Mar 5, 2020

  • Should be able to build on Windows
  • See linked issues, make sure they work
  • Publish Windows releases as part of CI
@nhooyr nhooyr added the enhancement Some improvement that isn't a feature label Mar 5, 2020
@danny-laa
Copy link

@nhooyr Any updates? Does 3.0 release support Windows?

@nhooyr
Copy link
Contributor Author

nhooyr commented May 1, 2020

There are no self contained windows releases yet.

We haven't tested but the npm package might work on windows. yarn global add code-server

@max-hk
Copy link
Contributor

max-hk commented May 2, 2020

There are no self contained windows releases yet.

We haven't tested but the npm package might work on windows. yarn global add code-server

I was able to install the npm package in windows, but I encounter a few bugs,

  1. src/browser/media/manifest.json not found

  2. All vscode-remote-resource path returns 404 not found, but this bug can easily be solved by removing leading slash in the path agument, eg.

    http://127.0.0.1:8080/vscode-remote-resource?path=/c:/Users/Max/AppData/Local/Yarn/Data/global/node_modules/@coder/code-server/lib/vscode/extensions/markdown-basics/language-configuration.json
    ➡ 404 not found

    http://127.0.0.1:8080/vscode-remote-resource?path=c:/Users/Max/AppData/Local/Yarn/Data/global/node_modules/@coder/code-server/lib/vscode/extensions/markdown-basics/language-configuration.json
    ➡ Correct path

  3. Syntax highlighting, extensions and themes not working (because of 2)

  4. Automatic update not working because https://github.com/cdr/code-server/releases/download/3.2.0/code-server-3.2.0-win32-x86_64.tar.gz does not exist

Furthermore, running the post install scripts requires Visual Studio and "VC++ 2015.3 v140 toolset for desktop (x86,x64)" to be installed, but since running code-server does not require electron to be built, I think it may be unnecessary.

@nhooyr nhooyr self-assigned this May 3, 2020
@nhooyr
Copy link
Contributor Author

nhooyr commented May 3, 2020

@MaxLOh Awesome thanks for looking into it!

@nhooyr
Copy link
Contributor Author

nhooyr commented May 6, 2020

The package is now just code-server on npm. We were able to get ownership from the previous owner.

src/browser/media/manifest.json not found

Fixed.

All vscode-remote-resource path returns 404 not found, but this bug can easily be solved by removing leading slash in the path agument, eg.

@code-asher

Automatic update not working because https://github.com/cdr/code-server/releases/download/3.2.0/code-server-3.2.0-win32-x86_64.tar.gz does not exist

We'll be removing automatic updates soon. See #1532 .

Furthermore, running the post install scripts requires Visual Studio and "VC++ 2015.3 v140 toolset for desktop (x86,x64)" to be installed, but since running code-server does not require electron to be built, I think it may be unnecessary.

Will mention this in docs, it is required as vscode uses native modules that have to be built.

code-asher added a commit that referenced this issue May 12, 2020
- Fix vscode-remote-resource, #1397.
- Fix double slash on webview, was causing images not to load.
- Fix client-side tar paths.
@nhooyr
Copy link
Contributor Author

nhooyr commented May 13, 2020

Asher has fixed the paths, will publish a new release soon.

@nhooyr
Copy link
Contributor Author

nhooyr commented May 13, 2020

We're going to need to test/rewrite any shell scripts that will have to run on Windows.

@nhooyr
Copy link
Contributor Author

nhooyr commented May 18, 2020

Marking this for v3.4.0, couldn't test/get CI going in time for v3.3.0

@nhooyr nhooyr added this to the v3.4.0 milestone May 18, 2020
@nhooyr nhooyr modified the milestones: v3.4.0, v3.3.2, v3.5.0 May 27, 2020
@EriKWDev
Copy link

EriKWDev commented Jul 12, 2020

How's the progress going for the windows release? :)
edit: spelling

@nhooyr nhooyr removed their assignment Aug 25, 2020
@nhooyr nhooyr modified the milestones: v3.5.0, v3.5.1 Aug 25, 2020
@wbobeirne wbobeirne removed this from the v3.5.1 milestone Sep 8, 2020
@fearthecowboy
Copy link

I only have a couple of minutes, and wanted to dump a couple notes here for y'all

I had trouble running code-server in development mode, because of a string smashing bug in http.ts

csStaticBase: base + "/static/" + this.options.commit + this.rootPath,
probably should be
csStaticBase: path.join( base, "/static/", this.options.commit , this.rootPath),

Oddly, this didn't affect it running the npm package version in windows (when I got that hacked about and running).

(sorry for the dump, I'll try to come back and put a PR in if I get time)

Fixing that, things started working, but I ran into cases where it's failing to read the settings (which means that nothing can be changed)

Unable to read file vscode-userdata:/c:/Users/garre/AppData/Local/code-server/Data/settings.json (Error: Unable to resolve non-existing file vscode-userdata:/c:/Users/garre/AppData/Local/code-server/Data/settings.json)

I went and created a file there, but it still wouldn't go. I haven't gone to look if it's just not liking the slash at the front or what.

@fearthecowboy
Copy link

The other problem I had was actually using a terminal window -- it'll start up powershell, but can't interact with the frame at all. Haven't looked into that either.

@code-asher
Copy link
Member

code-asher commented Sep 29, 2020

csStaticBase is used for assets loaded by the browser so I think it needs to be /. Although I think browsers will automatically convert so it shouldn't be a problem either way. But if doing that fixed something then it's very possible we're mis-using it somewhere.

I think you're right about the leading slash. I ran this on Windows:

> fs.existsSync("/c:/Users")
false
> fs.existsSync("c:/Users")
true

@fearthecowboy
Copy link

If you want to make the path always use forward slashes then I'd still go with

path.join( base, "/static/", this.options.commit , this.rootPath).replace(/\//g,'/') or something that smartly puts separators in, as the string smashing was missing a slash between development and the rest of the path. (IIRC ...static/developmentc:\...)

@code-asher
Copy link
Member

Ahhh that makes sense. That's a good point.

@nhooyr nhooyr added the os-windows Windows related label Dec 7, 2020
@code-asher
Copy link
Member

code-asher commented Oct 29, 2021 via email

@jsjoeio jsjoeio removed their assignment Oct 29, 2021
@lavahasif
Copy link

This worked for me
unfold
C:\Users"your user"\AppData\Local\Yarn\Data\global\node_modules\code-server
run postinstall using gitbash
run yarn install in git bash .it will work .node version switch to 14.17.0

@ivanjx
Copy link

ivanjx commented May 2, 2022

@lavahasif when running the postinstall i keep getting mklink not found and cannot open the terminal with error:

The terminal process failed to launch: A native exception occurred during launch (Cannot find module '../build/Release/pty.node'

@wizpresso-steve-cy-fan
Copy link

Instead of installing spdlog use this:

$ npm i -g @microsoft/1ds-core-js minimist yauzl yazl @vscode/spdlog xterm-headless

@suhrob008
Copy link

how to install code server on windows

@yekanchi
Copy link

how to install code server on windows

use npm , it just works like a charm in windows 11 on nodejs 16.20.2

@suhrob008
Copy link

yes

@Yarnacle
Copy link

I'm trying to install code-server on my Windows machine using npm, but after following the documentation word for word and reading through every comment in this thread for any insight, I still cannot install code-server on my machine. I used node 16.20.2, avoided using yarn, installed all of the prerequisites for node, added node to my path, and ran my commands through git bash, but nothing seems to be working.

Any help is appreciated; my sanity has deteriorated significant since I decided to get involved in this. Attached are the logs of my last installation attempt.
2023-09-28T06_26_36_216Z-debug-0.log

@code-asher
Copy link
Member

Unfortunately I have not tried building code-server on Windows so I am not going to be too helpful. There appear to be a few errors, but this one stands out to me: Failed to locate: "CL.exe".

I am not entirely certain where that comes from, but make sure you have all the prerequisites here: https://github.com/microsoft/vscode/wiki/How-to-Contribute

@yekanchi
Copy link

yekanchi commented Sep 29, 2023

I'm trying to install code-server on my Windows machine using npm, but after following the documentation word for word and reading through every comment in this thread for any insight, I still cannot install code-server on my machine. I used node 16.20.2, avoided using yarn, installed all of the prerequisites for node, added node to my path, and ran my commands through git bash, but nothing seems to be working.

Any help is appreciated; my sanity has deteriorated significant since I decided to get involved in this. Attached are the logs of my last installation attempt. 2023-09-28T06_26_36_216Z-debug-0.log

do you have visual studio 2019 build tools and msvc installed?

@code-asher code-asher changed the title Publish windows release Support and publish windows release Feb 29, 2024
@code-asher code-asher changed the title Support and publish windows release Support and publish Windows release Jul 10, 2024
@code-asher code-asher added the ci Issues related to ci label Jul 25, 2024
@dosgo
Copy link

dosgo commented Sep 12, 2024

image

@code-asher
Copy link
Member

cannot find module 'minimist' implies that the dependency installation step failed so you might want to try running npm with verbose logging and see if anything shows up.

@dosgo
Copy link

dosgo commented Sep 19, 2024

image
The installation seems to have no errors

@code-asher
Copy link
Member

Strange. Is it any different with verbose logging? I have seen npm hide installation errors from the post-install script.

@zby909
Copy link

zby909 commented Nov 5, 2024

Image
Why can't I use code-server -r [path]? Moreover, the sock file displayed in the console error message does not actually exist. -------I am a Windows system and installed code-server through npm.

@code-asher
Copy link
Member

I wonder if we are doing the socket incorrectly on Windows. None of this is currently tested on Windows unfortunately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci Issues related to ci enhancement Some improvement that isn't a feature os-windows Windows related
Projects
None yet
Development

No branches or pull requests