tag:help.appveyor.com,2012-11-13:/discussions/suggestions/266-nodejs-versions-should-be-preloadedAppVeyor: Discussion 2018-10-19T08:16:37Ztag:help.appveyor.com,2012-11-13:Comment/335107882014-06-24T03:37:31Z2014-06-24T03:37:31ZNode.js versions should be preloaded<div><p>How many releases would we need - the latest 0.8.x, 0.10.x and
0.11.x - three in total? Or more?</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/335107882014-06-25T21:06:39Z2014-06-25T21:06:39ZNode.js versions should be preloaded<div><p>Travis preloads a lot of Node versions and that would be nice
but I'd be happy even if just latest patch versions of each Node
release were available here; so yes, three in total (and four once
0.12 is released)</p>
<p>Travis uses nvm for that: <a href=
"https://github.com/creationix/nvm">https://github.com/creationix/nvm</a>.
Perhaps you could use <a href=
"https://github.com/hakobera/nvmw">https://github.com/hakobera/nvmw</a>
which is its adaptation to Windows? (I haven't tested that,
though).</p></div>m.golebtag:help.appveyor.com,2012-11-13:Comment/335107882014-06-25T21:22:17Z2014-06-25T21:22:17ZNode.js versions should be preloaded<div><p>I see. Looking at nvmw code - it downloads node.exe, npm.zip
then unpacks it. Well, I think we could have a faster approach -
I'll let you know when it's ready for testing.</p>
<ul>
<li>Feodor</li>
</ul></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/335107882014-06-25T21:27:39Z2014-06-25T21:27:39ZNode.js versions should be preloaded<div><p>Travis uses nvm in a way that they do a lot of:<br>
nvm install 0.10.26<br>
nvm install 0.10.27<br>
etc. before freezing the VM. Then on the actual run they read the
node_js field and do:<br>
nvm use THAT_FIELD<br>
so the actual switching is blazing fast and all VMs can still be
the same.</p>
<p>Obviously, you can preload Node versions however you want, I
just linked to a prepared approach.</p></div>m.golebtag:help.appveyor.com,2012-11-13:Comment/335107882014-06-25T21:30:49Z2014-06-25T21:30:49ZNode.js versions should be preloaded<div><p>Yeah, you're right. Thanks!</p>
<ul>
<li>Feodor</li>
</ul></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/335107882014-06-26T08:09:40Z2014-06-26T08:09:40ZNode.js versions should be preloaded<div><p>Hm, actually, Travis does load only latest patch versions of
Node.js (not sure if always or if they keep the previous one as
well etc.); see:<br>
<a href=
"http://docs.travis-ci.com/user/languages/javascript-with-nodejs/#Provided-Node.js-Versions">
http://docs.travis-ci.com/user/languages/javascript-with-nodejs/#Pr...</a></p>
<p>I don't even think we need 0.6.</p></div>m.golebtag:help.appveyor.com,2012-11-13:Comment/335107882014-06-26T08:11:47Z2014-06-26T08:11:47ZNode.js versions should be preloaded<div><p>See e.g. this run:<br>
<a href=
"https://travis-ci.org/mishoo/UglifyJS2/jobs/23880455">https://travis-ci.org/mishoo/UglifyJS2/jobs/23880455</a><br>
A month ago they had:<br>
- 0.6.21 - 0.8.23, 0.8.25, 0.8.26 - 0.10.18 0.10.25 - 0.11.11</p></div>m.golebtag:help.appveyor.com,2012-11-13:Comment/335107882014-06-26T14:34:43Z2014-06-26T14:34:43ZNode.js versions should be preloaded<div><p>Yeah, I see.</p>
<ul>
<li>Feodor</li>
</ul></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/335107882014-12-29T14:20:29Z2014-12-29T14:20:29ZNode.js versions should be preloaded<div><p>Hi,</p>
<p>did you manage to make any progress on the issue? With recent
Travis speed ups (<a href=
"http://docs.travis-ci.com/user/workers/container-based-infrastructure/">http://docs.travis-ci.com/user/workers/container-based-infrastructure/</a>)
the slowness of AppVeyor runs when the needed Node versions is
different than the preloaded one is really jarring; it often
doubles the test time, sometimes even triples.</p></div>m.golebtag:help.appveyor.com,2012-11-13:Comment/335107882014-12-29T18:27:53Z2014-12-29T18:27:53ZNode.js versions should be preloaded<div><p>There is a faster way to switch node.js:</p>
<p>Install-Product node [x86|x64]</p>
<p>However, the latest available node.js version on build workers
is 0.10.32. We are going to add recent ones in the coming week.</p>
<p>Regarding containers - when <a href=
"http://weblogs.asp.net/scottgu/docker-and-microsoft-integrating-docker-with-windows-server-and-microsoft-azure">
it comes to Windows</a> we'll be supporting that for sure. Though I
believe our Hyper-V based environment has comparable performance.
It's just open-source that currently runs on Azure, but this might
change in the future.</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/335107882014-12-29T18:34:57Z2014-12-29T18:34:57ZNode.js versions should be preloaded<div><p>Most projects will need to test on at least two different
Node.js minor versions. The patch level itself is not <em>that</em>
important (obviously within reason, it's good to have a recent
patch) but many people need at least 0.8, 0.10 and 0.11. Once 0.12
comes out, it can replace 0.11 pre-release versions.</p>
<p>I test most of my Node modules on 0.10 and 0.11 so I feel the
slowness in the 0.11 case; see e.g.: <a href=
"https://ci.appveyor.com/project/mzgol/check-dependencies/build/89">
https://ci.appveyor.com/project/mzgol/check-dependencies/build/89</a></p></div>m.golebtag:help.appveyor.com,2012-11-13:Comment/335107882014-12-29T19:03:32Z2014-12-29T19:03:32ZNode.js versions should be preloaded<div><p>Cool, then replace <code>Update-NodeJsInstallation
(Get-NodeJsLatestBuild $env:nodejs_version)</code> with
<code>Install-Product node $env:nodejs_version</code> to speedup
0.11 job. Look at the example: <a href=
"https://github.com/gruntjs/grunt/blob/master/appveyor.yml#L22">https://github.com/gruntjs/grunt/blob/master/appveyor.yml#L22</a></p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/335107882015-01-01T18:33:13Z2015-01-01T18:33:13ZNode.js versions should be preloaded<div><p>Thanks a lot, that speeds up the build a lot!</p>
<p>One question - are all these commands as well as Node versions
available via this command documented anywhere? I couldn't find
it.</p></div>m.golebtag:help.appveyor.com,2012-11-13:Comment/335107882015-01-02T00:03:21Z2015-01-02T00:03:21ZNode.js versions should be preloaded<div><p>There is a note here: <a href=
"http://www.appveyor.com/docs/installed-software">http://www.appveyor.com/docs/installed-software</a><br>
Maybe not the best place and it deserves a separate article.</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/335107882015-01-02T13:35:51Z2015-01-02T13:35:51ZNode.js versions should be preloaded<div><p>Thanks! The thread can be closed now. :)</p></div>m.goleb