Open ZebraFlesh opened 8 years ago
nvm arch 32
should set the default for you.
I'll have to look at why it's not autodetecting this. Is your settings file showing 64-bit architecture? I suspect it is, and I suspect the installer is to blame in this case.
I won't have time to look into this for a little while. If someone else does, the test to perform is building from source on a clean 32-bit system as opposed to using the installer. If it properly shows 32-bit when built from source, it signifies the problem is in the installer. Otherwise, it's in the code base.
The settings file does not contain an arch setting.
Hm. Is arch
even listed, or is it just blank?
It was not even listed
I'll have to look at how nvm4w is determining the OS bitness, but if it was looking at the CPU capabilities I would definitely expect to see this more on 32 bit machines running on a 64 bit capable system.
I'm experiencing the exact same issue on Windows 7 32bit with a 64 bit CPU. Unlike @espoelstra 's install, this is a native installation, not virtualized.
If this is a question about how to use NVM4W, please use stackoverflow instead.
If this is an issue regarding antivirus, make sure you search the existing issues first.
My Environment
I have already...
My issue is related to (check only those which apply):
Expected Behavior
nvm prints help indicating that
nvm install
"defaults to system arch". I'm running a 32-bit OS so I expected it to download a 32-bit version of node.Actual Behavior
nvm is installing 64-bit versions of node, likely due to the fact that Windows is a guest OS in a virtual container.
Steps to reproduce the problem:
1) On a 64-bit OS (such as OS X), grab an IE 11 on Win 8.1 virtual machine from https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/ (this seems to always come as a 32-bit OS; there's no architecture selection) 2) Install the VM in the container of your choice (I've tried both VMWare and VirtualBox) 3) Boot up the VM, verify it's a 32-bit instance (System Properties as well as
wmic OS get OSArchitecture
from the command prompt) 4) Install nvm-windows 1.1.1 5) Refresh $PATH as necessary 6) Executenvm arch
and receive the output:System Default: 64-bit. Currently Configured: -bit.
7) Executenvm install 4.4.0
followed bynvm use 4.4.0
: node 4.4.0 (64-bit) downloads and installs without issue 8) Executenode -v
and see the messageThis version of C:\Program Files\nodejs\node.exe is not compatible with the version of Windows you're running. Check your computer's system information and then contact the software publisher.
Work around: explicitly specify arch during installation:
nvm install 4.4.0 32
. Likely adding the arch to the settings.txt file would also work, but I didn't try that.