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

Add appveyor support #51

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ async function buildArchPackage(os, cpu, version, pre) {
debug("building architecture specific package", os, cpu, version, pre)

const platform = os == 'win' ? 'win32' : os
const arch = os == 'win' && cpu == 'ia32' ? 'x86' : cpu
const arch = os == 'win' && cpu == 'ia32' ? ['x86', 'ia32'] : cpu
Copy link
Owner

Choose a reason for hiding this comment

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

Where are these coming from / used? Is there a nodejs binary release marked ia32?

Copy link

Choose a reason for hiding this comment

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

This change is necessary for 32bit Windows to install the npm package node, otherwise npm will throw

error C:\Users\IEUser\babel\packages\babel-preset-env\node_modules\node: Command failed.
Exit code: 1
Command: node installArchSpecificPackage
Arguments: 
Directory: C:\Users\IEUser\babel\packages\babel-preset-env\node_modules\node
Output:
npm ERR! code EBADPLATFORM
npm ERR! notsup Unsupported platform for [email protected]: wanted {"os":"win32","arch":"x86"} (current: {"os":"win3
2","arch":"ia32"})
npm ERR! notsup Valid OS:    win32
npm ERR! notsup Valid Arch:  x86
npm ERR! notsup Actual OS:   win32
npm ERR! notsup Actual Arch: ia32
npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\IEUser\AppData\Roaming\npm-cache\_logs\2019-12-17T01_34_23_329Z-debug.log
internal/modules/cjs/loader.js:628
    throw err;
    ^
Error: Cannot find module 'node-win-x86/package.json'

As long as ia32 is mapped to install node-win-x86 instead, we should state this at its package.json that cpus: ["x86", "ia32"] is supported.

const executable = os == 'win' ? 'bin/node.exe' : 'bin/node'

const dir = "node-" + os + '-' + cpu
Expand Down