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

Node.js on ChakraCore #1148

Open
xzyfer opened this issue Nov 2, 2016 · 12 comments
Open

Node.js on ChakraCore #1148

xzyfer opened this issue Nov 2, 2016 · 12 comments

Comments

@xzyfer
Copy link

xzyfer commented Nov 2, 2016

Add support for node-chakracore. They provide precompiled msi binaries for each GH release.

This will help adoption, and stress testing of node-chakracore.

Related
nodejs/node-chakracore#136
sass/node-sass#1776
sass/node-sass#1777

@IlyaFinkelshteyn
Copy link
Contributor

Hello, you can install msi you need at init stage of AppVeyor build with simple script which takes about 20 seconds and looks like this:

Write-Host "Installing node-chakracore..." -ForegroundColor Cyan
Write-Host "Downloading..."
$msiPath = "$env:USERPROFILE\node-chakracore-x64.msi"
(New-Object Net.WebClient).DownloadFile('https://github.com/nodejs/node-chakracore/releases/download/node-chakracore-7.0.0-pre9/node-chakracore-x64.msi', $msiPath)
Write-Host "Installing..."
cmd /c start /wait msiexec /i $msiPath /quiet
Write-Host "node-chakracore installed" -ForegroundColor Green

--ilya.

@xzyfer
Copy link
Author

xzyfer commented Nov 3, 2016

Thanks @IlyaFinkelshteyn. I've tried something similar but run into an issue with DownloadFile.

Exception calling "DownloadFile" with "2" argument(s): "The request was aborted: The connection was closed unexpectedly."
At line:5 char:3
+   (New-Object Net.WebClient).DownloadFile('https://github.com/nodejs/ ...
+   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : WebException

Installing...
node-chakracore installed

@IlyaFinkelshteyn
Copy link
Contributor

Please try script provided, it was tested with AppVeyor before publishing here,

@IlyaFinkelshteyn
Copy link
Contributor

Also you can implement retry if network connection appears to be flaky.

@xzyfer
Copy link
Author

xzyfer commented Nov 3, 2016

@xzyfer
Copy link
Author

xzyfer commented Nov 3, 2016

I can get it installing now but node appears to still be executing node 4.

@IlyaFinkelshteyn
Copy link
Contributor

OK, I am not very familiar with this product, but I see that when you install msi, it creates Node.js (chakracore) command prompt shortcut from which commands supposed to be executed. No difference with AppVeyor I believe. This shortcut calls C:\Windows\System32\cmd.exe /k "C:\Program Files\nodejs (chakracore)\nodevars.bat". Please try to add this command before executing you node code and see if this helps.

@xzyfer
Copy link
Author

xzyfer commented Nov 3, 2016

I have managed to get this working in https://github.com/sass/node-sass/blob/trash/chakra/appveyor.yml.

For reference node-chakracore is an experimental new Node.js engine currently primarily targeted at Windows. It's something Node projects on Windows will want to start testing against. It's for this reason I opened this request for an official support.

Install-Product node-chakracore $env:nodejs_version $env:platform

@kunalspathak
Copy link

@IlyaFinkelshteyn . currently sass/node-sass#1777 is fetching the msi from node-chakracore release page. We are working on getting CI builds from node-cahkracore in nodejs org. Once that is done, we should add custom installation in nodejs-utils.psm1 for node-chakracore which will download the version specific binaries from https://nodejs.org/dist/. That way, we (node-chakracore or node-sass team) won't have to worry editing the appveyor.yml of node-sass every time we release new binary.

@kunalspathak
Copy link

Alternatively we could use nvs that supports running various versions of node in CI environment. It has support for both appveyor and Travis.

@dougwilson
Copy link

I would like to see out-of-the-box nvs available in Appveyor, both for Node.js versions and for Chakra like @kunalspathak pointed out. I think that may work better in the end vs the PowerShell script used currently?

@smola
Copy link

smola commented May 14, 2018

Once that is done, we should add custom installation in nodejs-utils.psm1 for node-chakracore which will download the version specific binaries from https://nodejs.org/dist/. That way, we (node-chakracore or node-sass team) won't have to worry editing the appveyor.yml of node-sass every time we release new binary.

@kunalspathak You could also retrieve latest tag from GitHub to build the download URL. For example: https://gist.github.com/smola/388b05b2602fd91c33975744ba653975#powershell

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

5 participants