Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Install Error on Windows Server 2008 R2 #298

Closed
io2work opened this Issue · 5 comments

4 participants

@io2work

I tried to follow the install instructions for Windows from the npmjs.org but I get the following error?

c:\node\SerialPort\node-serialport>node-gyp configure --python v2.7.6
gyp info it worked if it ends with ok
gyp info using node-gyp@0.12.2
gyp info using node@0.10.24 | win32 | x64
gyp info spawn C:\Python27\python.exe
gyp info spawn args [ 'C:\Users\administrator.ABRASIVE-TECH\AppData\Roaming\
\npm\node_modules\node-gyp\gyp\gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'msvs',
gyp info spawn args '-G',
gyp info spawn args 'msvs_version=auto',
gyp info spawn args '-I',
gyp info spawn args 'c:\node\SerialPort\node-serialport\build\config.gypi
',
gyp info spawn args '-I',
gyp info spawn args 'C:\Users\administrator.ABRASIVE-TECH\AppData\Roaming\
\npm\node_modules\node-gyp\addon.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\Users\administrator.ABRASIVE-TECH\.node-gyp\0.10.2
4\common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=C:\Users\administrator.ABRASIVE-TECH\.
node-gyp\0.10.24',
gyp info spawn args '-Dmodule_root_dir=c:\node\SerialPort\node-serialport',

gyp info spawn args '--depth=.',
gyp info spawn args '--generator-output',
gyp info spawn args 'c:\node\SerialPort\node-serialport\build',
gyp info spawn args '-Goutput_dir=.' ]

module.js:340
throw err;
^
Error: Cannot find module 'nan'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at [eval]:1:1
at Object. ([eval]-wrapper:6:22)
at Module._compile (module.js:456:26)
at evalScript (node.js:532:25)
at startup (node.js:80:7)
at node.js:902:3
gyp: Call to 'node -e "require('nan')"' returned exit status 8.
gyp ERR! configure error
gyp ERR! stack Error: gyp failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (C:\Users\administrator.ABRASIVE-TEC
H\AppData\Roaming\npm\node_modules\node-gyp\lib\configure.js:337:16)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:789:
12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "C:\Users\administrator.ABRASIVE-TECH\AppData\Roamin
g\npm\node_modules\node-gyp\bin\node-gyp.js" "configure" "--python" "v2.7.6
"
gyp ERR! cwd c:\node\SerialPort\node-serialport
gyp ERR! node -v v0.10.24
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok

@io2work io2work closed this
@io2work io2work reopened this
@io2work

After trying everything under the sun on the Windows Server 2008 R2, I decided to fire up a virtual instance of Windows 7 x64 that I have and give it a shot there. After installing the latest version of Node.js (v0.10.25) and Python (v2.7.6) I simply ran "npm install serialport" and it worked just fine.

Then I just copied the node_modules folder over to the server and it works just fine.

I have no idea why it would load on my Windows 7 x64 box but not the Server 2008 R2 x64 box?

The only difference between the two setups is that the Server has Visual Studio Express 2013 for Desktop, where as the Windows 7 box has the full Visual Studio 2010.

@JayBeavers
Collaborator

Hmm, the error is in finding 'nan'. I wonder if there is a compatibility issue between NAN and Server 2008. I tried this out using VS 2013 on Windows 8.1, but didn't run it on Server 2008.

If you still have server 2008 available, try installing nan independently first -- e.g. "npm install -g nan" and see if that works and if it clears up your issue.

@rvagg, any thoughts? FYI, this is the second bug I've seen that has issue with the code:

'include_dirs': [
    '<!(node -e "require(\'nan\')")'
  ]

I'm wondering if they may be a way of approaching this problem that may have fewer or more understandable side effects?

@rvagg

@io2work have you got a node_modules subdirectory? i.e. have you done an npm install here?

@JayBeavers
Collaborator

Ah, good point. If you haven't performed a basic 'npm install', your dependencies won't be present. By calling into 'node-gyp configure' directly, you've skipped the part of the process that will auto-download 'nan' for you.

@reconbot
Collaborator

I'm going to close this for now but please let us know if it's still an issue. Our new precompiled packages may help skip around this issue completely.

@reconbot reconbot closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.