Skip to content

improve npm/yarn install flow and add Windows 10 instructions #4015

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

Merged
merged 10 commits into from
Aug 24, 2021

Conversation

bpmct
Copy link
Member

@bpmct bpmct commented Aug 22, 2021

The user flow for our npm docs were slightly confusing to me. While there was a dedicated page for the npm prerequisites, the install command itself was on install.md. This PR moves all of the steps to npm.md.

Windows 10 instructions were also added to this PR since it benefits from the improved docs structure, as there are quite a few "gotchas" with installing on Windows, which have now been documented. It also links to #1397, to centralize issues & discussions around additional support for Windows.

@bpmct bpmct added the docs Documentation related label Aug 22, 2021
@bpmct bpmct self-assigned this Aug 22, 2021
@bpmct bpmct requested a review from a team as a code owner August 22, 2021 17:41
Comment on lines -112 to -113
You must have Node.js v12 (or later) installed. See
[#1633](https://github.com/cdr/code-server/issues/1633).
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the npm.md page recommends node v14 and links to the same issue. Since the VS Code page mentions Node v14, I decided to remove this to be consistent

docs/npm.md Outdated
# npm Install Requirements
# yarn, npm
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this PR suggests changing this page to an overall doc on installing with yarn, not just the prereqs


## Windows

Installing code-server requires all of the [prerequisites for VS Code development](https://github.com/Microsoft/vscode/wiki/How-to-Contribute#prerequisites). When installing the C++ compiler tool chain, we recommend using "Option 2: Visual Studio 2019" for best results.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I ran into several issues installing windows-build-tools on a fresh Windows machine.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sounds kinda rough. I have some experience building stuff on Windows (actually doing Clang/LLVM + MSVC, which I think can be cross-compiled under Wine) so this might be something I can look into at some point...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, installing Visual Studio is an unfortunate prerequisite, where npm install -g windows-build-tools would be a bit more understandable.

If you think it'd be helpful, I can do some more debugging with the npm method and see if there are any pointers I can leave in this doc, or put upstream.

@github-actions
Copy link

github-actions bot commented Aug 22, 2021

✨ Coder.com for PR #4015 deployed! It will be updated on every commit.

@codecov
Copy link

codecov bot commented Aug 22, 2021

Codecov Report

Merging #4015 (b654776) into main (30dc47d) will not change coverage.
The diff coverage is n/a.

❗ Current head b654776 differs from pull request most recent head 60b3323. Consider uploading reports for the commit 60b3323 to get more accurate results
Impacted file tree graph

@@           Coverage Diff           @@
##             main    #4015   +/-   ##
=======================================
  Coverage   63.51%   63.51%           
=======================================
  Files          36       36           
  Lines        1872     1872           
  Branches      379      379           
=======================================
  Hits         1189     1189           
  Misses        580      580           
  Partials      103      103           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 30dc47d...60b3323. Read the comment docs.

@@ -12,6 +12,7 @@
- [macOS](#macos)
- [Docker](#docker)
- [Helm](#helm)
- [Windows](#windows)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@BrunoQuaresma The preview for this PR seems to show the old build rather than the new one for some reason, maybe a missing env var in the build settings or something?

image

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


## Windows

Installing code-server requires all of the [prerequisites for VS Code development](https://github.com/Microsoft/vscode/wiki/How-to-Contribute#prerequisites). When installing the C++ compiler tool chain, we recommend using "Option 2: Visual Studio 2019" for best results.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sounds kinda rough. I have some experience building stuff on Windows (actually doing Clang/LLVM + MSVC, which I think can be cross-compiled under Wine) so this might be something I can look into at some point...

bpmct and others added 2 commits August 23, 2021 11:06
Co-authored-by: Katie Horne <[email protected]>
Co-authored-by: Katie Horne <[email protected]>
Copy link
Contributor

@jsjoeio jsjoeio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Thanks for investigating this and adding the docs @bpmct 🙌

@greyscaled greyscaled removed their request for review August 23, 2021 19:41
@greyscaled
Copy link
Contributor

greyscaled commented Aug 23, 2021

delegating my review to @jawnsy and @jsjoeio - it looks great from what I saw ✔️

Copy link
Contributor

@jawnsy jawnsy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All of this seems reasonable to me, thanks for writing it Ben!

@bpmct bpmct enabled auto-merge August 24, 2021 00:30
@bpmct bpmct merged commit ffc47d3 into main Aug 24, 2021
@bpmct bpmct deleted the bpmct/win10-npm branch August 24, 2021 00:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants