iisnode icon indicating copy to clipboard operation
iisnode copied to clipboard

support for x64 of node.js

Open tjanczuk opened this issue 14 years ago • 27 comments

The iisnode MSI must be updated to check for x64 instead of x86 in this case The default nodeProcessCommandLine may also require updates

tjanczuk avatar Jun 26 '12 20:06 tjanczuk

I am trying to install the x64 version of iisnode with iisnode-full-iis7-v0.1.19.0-x64.msi. I am getting an error message that node.exe cannot be found in c:\program files (x86). I have installed the 64 bit version of node.js release 0.8.1. It has installed nodejs in the directory c:\program files. I do not see a way to change the directory in the installation package.

JoanGaastra avatar Jul 01 '12 22:07 JoanGaastra

You must use the nodeProcessCommandLine setting in the iisnode section of web.config (https://github.com/tjanczuk/iisnode/blob/master/src/samples/configuration/web.config) or in the iisnode.yml configuration file (https://github.com/tjanczuk/iisnode/blob/master/src/samples/configuration/iisnode.yml) to indicate the command line iisnode should use to launch the node.exe process. If using iisnode.yml, you would need to say something like this:

nodeProcessCommandLine: C:\program files\nodejs\node.exe

tjanczuk avatar Jul 02 '12 17:07 tjanczuk

I do not get that far. I cannot install iisnode using the msi package (iisnode-full-iis7-v0.1.19.0-x64.msi). During the installation process I am getting the error message "The node.exe is not found at C:\Program Files (x86)\nodejs. IIS cannot service node.js applications without node.exe. Please run the latest node.js installer......, then restart this installer". I expect that the problem is that I have installed the 64 bit version of node.js (release 0.8.1). I downloaded it from the nodejs site. I finally fooled the msi by manually creating the directory C:\Program Files (x86)\nodejs and copying the file node.exe to it. But this might create all kind of new problems. I still have the impression that there is a problem in the msi file.

JoanGaastra avatar Jul 03 '12 12:07 JoanGaastra

Yes, the MSI currently requires x86 version of node.js to be installed. This will be addressed in the future to allow either x64 or x86 versions. As you said, the iisnode MSI can be tricked into installing regardless by either manually placing node.exe in %programfiles(x86)\nodejs\node.exe, or by simply installing the x86 version of node.js before installing iisnode. After iisnode is installed, x86 version of node.js can be removed, as long as the nodeProcessCommandLine setting in the iisnode config is updated to point to an existing x64 or x86 version of node.exe.

tjanczuk avatar Jul 03 '12 23:07 tjanczuk

Also, may I ask why you require x64 of node.js in your application?

tjanczuk avatar Jul 04 '12 17:07 tjanczuk

I have downloaded the latest x64 installer and it checks for node.js in Program Files (x86). If you are going to have an x64 installer, shouldn't it check for an x64 node?

pshevrin avatar Aug 09 '12 12:08 pshevrin

The bitness of iisnode need not match the bitness of node.exe it is using. Currently by default iisnode requires 32 bit node.exe, but if you read this thread you will learn how you can substitute 64 bit version of node.js instead.

tjanczuk avatar Aug 09 '12 17:08 tjanczuk

This is a very annoying hurdle for iisnode. I reinstalled node 3 times before realizing it was only checking for 32 bit node. Once I realized what was happening I was able to move it into the other folder for installation but it does seem extremely odd to offer a 64 bit installer for iisnode but not check for 64 bit node. Yes the bitness does not "need" to match that of node, but if I'm downloading 64 bit iisnode what do you think the chances are that I also installed 64 bit node? Pretty high I would think.

AlexAllocated avatar Sep 10 '12 16:09 AlexAllocated

I hear you. This will be fixed.

tjanczuk avatar Sep 10 '12 16:09 tjanczuk

This table shows which node.js version will be required given a particular installer/os architecture combination:

installer                      OS      node.js required

iisnode-dev.msi                any     none
iisnode-core|full.msi          x86     x86
iisnode-core|full.msi          x64     x64
iisnode-express.msi            x86     x86 
iisnode-express.msi            x64     x64
iisnode-core|full.msi WOW=1    x64     x86

tjanczuk avatar Sep 12 '12 23:09 tjanczuk

Nice :D

AlexAllocated avatar Sep 13 '12 07:09 AlexAllocated

  • Also, may I ask why you require x64 of node.js in your application?

Probably because he has an x64 CPU and wants to take advantage of it.

Venemo avatar Sep 24 '12 09:09 Venemo

Why has this been closed? I've just tried to install and have the same problem as the person that opened this thread. The installer still doesn't work and also the proposed solution of changing the web.config is a bit confusing as I surely need iisnode installed to be able to do this - the reason I'm here!

matthewblott avatar Oct 02 '12 21:10 matthewblott

This change has been checked into the repository but not released as a binary MSI yet. The MSI should be released within two weeks; until then you can build the project with this fix in place.

tjanczuk avatar Oct 02 '12 22:10 tjanczuk

Change of plans. The new fix to this issue is follows:

  • by default, iisnode will look up node.exe using the PATH search at runtime
  • a specific, fully qualified file path can be specified using nodeProcessCommandLine in iisnode.yml or web.config@iisnode, and it takes precedence over the default lookup logic
  • at installation time, there will be no check performed for existence of node.js installation; instead the activating message will return a descriptive error at runtime

The end result in terms of experience is that on x64 systems, one can have either node.js x64 or x86 installed, and either will work fine with iisnode x64.

tjanczuk avatar Oct 11 '12 00:10 tjanczuk

As a work around, until the MSI is available and in WebPI ...

from an administrator command prompt: mklink /D "C:\Program Files (x86)\nodejs" "C:\Program Files\nodejs"

tracker1 avatar Oct 18 '12 17:10 tracker1

@tracker1 YES!!!!

ayoung avatar Oct 19 '12 22:10 ayoung

Symbolic link worked like a charm, thanks a lot!

DenysVuika avatar Dec 19 '12 18:12 DenysVuika

Apparently, In web.config, nodeProcessCommandLine="&quot ;%programfiles%\nodejs\node.exe&quot ;" (without spaces) never worked for me but hardcoding the path like nodeProcessCommandLine="C:\program files\nodejs\node.exe" helped me.

hvkale avatar Apr 06 '13 22:04 hvkale

Awesome. Glad this is fixed :)

AlexAllocated avatar Apr 16 '13 02:04 AlexAllocated