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

Recent Node is hard to use #3277

Closed
guidobouman opened this issue Jan 13, 2020 · 3 comments
Closed

Recent Node is hard to use #3277

guidobouman opened this issue Jan 13, 2020 · 3 comments

Comments

@guidobouman
Copy link

guidobouman commented Jan 13, 2020

Issue

We use nvm on all development machines (macOS & Windows) & on AppVeyor to manage Node versions. At first we had a specific node version lock in .nvmrc: 10.15.3, this worked for us. Now we are upgrading our node version to v12. We're trying to stay in sync with the current LTS version of Node over multiple projects. We also want to keep the control over when we switch to the newer LTS.

That's why we tried lts/erbium: nvm liked this, but AppVeyor less so. The following script works for specific versions but does not support all nvm aliases:

Install-Product node (Get-Content ./.nvmrc) x64

Luckily lts/erbium is just an alias to 12, so using that worked on our machines and AppVeyor.

Unfortunately though, AppVeyor only supports LTS releases from two months ago or more. 12.13.1 (19-11-2019) is the newest on AppVeyor, while 12.14.0 (17-12-2019) & 12.14.1 (01-07-2020) have released in the meantime. We now have a difference in Node versions on our machines vs CI.

We know that if you want to be on the bleeding edge of LTS, you need something like the script below.

Update-NodeJsInstallation (Get-NodeJsLatestBuild (Get-Content ./.nvmrc)) x64

But this seems to uninstall Node 8 for 40 seconds, and needs 20 seconds to install the latest node version. (Timed 3 times with a stopwatch, not very scientific but gives an indication) The manual update slows down builds by over a minute in average. That is not acceptable for us.

Request

Is there a way for AppVeyor to smoothen the process of Node usage?

  • More often sync the versions with Node?
  • Speedup the manual installation?

Some solutions we can think of:


CC: #1968 & #727

This was referenced Jan 13, 2020
@guidobouman
Copy link
Author

guidobouman commented Jan 13, 2020

Update: Cached install with fallback to manual update can work like this:

before_build:
- ps: |
    $latestNode = (Get-NodeJsLatestBuild (Get-Content ./.nvmrc))
    try {
      Install-Product node $latestNode x64
    } catch {
      echo "Unable to install node from cache, trying update..."
      Update-NodeJsInstallation $latestNode x64
    }

But that requires AppVeyor to be up to date with available Node versions at least part of the time.

Idea credits to #2921 (comment)

@guidobouman
Copy link
Author

There is an upcoming Node releases schedule:
https://github.com/nodejs/Release/wiki/Release-Schedule

Maybe AppVeyor can sync up with this schedule?

@guidobouman
Copy link
Author

Zero response or movement on this in the last 8 months. I'll just close this issue as it seems the product is not willing to improve. This has caused our company to migrate to Azure DevOps with all of our projects.

@FeodorFitsner Feel free to reopen if you want to actually work on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant