Setting up Development Environment on Windows - Errors on "npm install"

  • 1
  • Question
  • Updated 3 years ago
  • Answered
I am trying to set up a development environment for building and extending Rise Vision widgets on my Windows computer.  I believe I've installed the necessary prerequisites (git, node, npm, bower, gulp, ruby, sass, details below), but after cloning the github repository for the base widget when I run "npm install", npm fails with many errors similar to this one:

          C:\Users\phineas\.node-gyp\4.3.1\include\node\v8.h(2081) : see declar
  ation of 'v8::String'
D:\dev\widget-hello-world\node_modules\widget-tester\node_modules\karma\node_mo
dules\socket.io\node_modules\socket.io-client\node_modules\ws\node_modules\nan\
nan.h(1729): error C2039: 'ExternalAsciiStringResource' : is not a member of 'v
8::String' [D:\dev\widget-hello-world\node_modules\widget-tester\node_modules\k
arma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws\build
\bufferutil.vcxproj]


Before I get too deeply into the npm-debug.log, can anybody provide any clues about whether I've correctly set up npm on Windows?  Do you know of any tricks or pitfalls?  My component versions are:

Windows 8.1 64 bit
Visual Studio 2013 Community Edition
python 2.7.11
Ruby 2.2.4 (32 bit)
Git 1.8.1
Node 4.3.1
npm 2.14.12
bower 1.7.7
gulp CLI version 3.9.1
sass 3.4.21 (Selective Steve)

Thanks in advance for any clues to getting "npm install" to work right.  I can provide more details if helpful.
Photo of Steve Gregory

Steve Gregory, Champion

  • 1,186 Points 1k badge 2x thumb

Posted 3 years ago

  • 1
Photo of HSuarez

HSuarez

  • 11,896 Points 10k badge 2x thumb
Looking into one of the error codes (error C2039: 'ExternalAsciiStringResource' : is not a member of 'v
8::String'
) seems to be related to a few threads that I've found which involved moving to a newer version of ws:
http://stackoverflow.com/questions/29...
https://github.com/nodejs/node/issues...

Someone else may have run into a similar issue here while setting up the development environment but let us know how you go with the above link suggestions.
Photo of Steve Gregory

Steve Gregory, Champion

  • 1,186 Points 1k badge 2x thumb
Thanks Hsuarez for that helpful clue.  These two articles definitely describe my issue.  
I'm new to npm but learning fast!  Running manually down the list of dependencies and devDependencies in each package.json file, I've discovered that the errors come from:

    widget-tester | karma ^0.12.17 | socket.io ~0.9.13 | socket.io-client | ws

I gather from Karma's release notes that this issue was discovered and fixed somewhere around karma 0.13.20 | socket.io 1.4.5, so I'd like to find out whether the "widget-tester" package can work with karma 13.xx, but I'm not sure how to set this up in my local environment.  I'm still stuck but I'm pretty sure this is the correct direction to investigate so I will keep plugging.