title: Node failure on windows 7
body: <p>==============================</p>
  
  <h1><strong>SOLVED:</strong> switched from node 4.0.0 to 0.12.7. Node v4.0.0 seems to be pretty raw yet</h1>
  
  <p>I've read many articles, they didn't help me. Any workarounds?</p>
  
  <p>I've installed Visual Studio Express 2013 on my Windows 7, and did <code>set GYP_MSVS_VERSION=2013</code>. But I still get the following errors related to <code>socket.io</code> dependency while <code>npm install</code>:</p>
  
  <pre><code>error C2995: 'v8::Local&lt;T&gt; _NanEnsureLocal(v8::Local&lt;T&gt;)' : function template 
  error C3083: 'smalloc': the symbol to the left of a '::' must be a type [
  error C2039: 'FreeCallback' : is not a member of 'node' [
  error C2061: syntax error : identifier 'FreeCallback' [
  error C2065: 'callback' : undeclared identifier [
  ..............
  gyp ERR! build error
      gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\12.0\bin\msbuild.exe` failed with exit code: 1
      gyp ERR! stack     at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:270:23)
      gyp ERR! stack     at emitTwo (events.js:87:13)
      gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
      gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
      gyp ERR! System Windows_NT 6.1.7601
      gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
      gyp ERR! cwd PROJECT_PATH\node_modules\webpack-dev-server\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\bufferutil
      gyp ERR! node -v v4.0.0
      gyp ERR! node-gyp -v v3.0.1
      gyp ERR! not ok
  </code></pre>
  
  <p><em>Full log</em></p>
  
  <pre><code>PROJECT_PATH\node_modules\webpack-dev-server\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\bufferutil&gt;if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node  rebuild )
  Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
    bufferutil.cc
  PROJECT_PATH\node_modules\webpack-dev-server\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\bufferutil\node_modules\nan\nan.h(263): error C2995: 'v8::Local&lt;T&gt; _NanEnsureLocal(v8::Local&lt;T&gt;)' : function template has already been defined [PROJECT_PATH\node_modules\webpack-dev-server\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\bufferutil\build\bufferutil.vcxproj]
            PROJECT_PATH\node_modules\webpack-dev-server\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\bufferutil\node_modules\nan\nan.h(256) : see declaration of '_NanEnsureLocal'
  PROJECT_PATH\node_modules\webpack-dev-server\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\bufferutil\node_modules\nan\nan.h(661): error C3083: 'smalloc': the symbol to the left of a '::' must be a type [PROJECT_PATH\node_modules\webpack-dev-server\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\bufferutil\build\bufferutil.vcxproj]
  PROJECT_PATH\node_modules\webpack-dev-server\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\bufferutil\node_modules\nan\nan.h(661): error C2039: 'FreeCallback' : is not a member of 'node' [PROJECT_PATH\node_modules\webpack-dev-server\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\bufferutil\build\bufferutil.vcxproj]
  PROJECT_PATH\node_modules\webpack-dev-server\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\bufferutil\node_modules\nan\nan.h(661): error C2061: syntax error : identifier 'FreeCallback' [PROJECT_PATH\node_modules\webpack-dev-server\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\bufferutil\build\bufferutil.vcxproj]
  PROJECT_PATH\node_modules\webpack-dev-server\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\bufferutil\node_modules\nan\nan.h(665): error C2065: 'callback' : undeclared identifier [PROJECT_PATH\node_modules\webpack-dev-server\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\bufferutil\build\bufferutil.vcxproj]
  PROJECT_PATH\node_modules\webpack-dev-server\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\bufferutil\node_modules\nan\nan.h(665): error C2065: 'hint' : undeclared identifier [PROJECT_PATH\node_modules\webpack-dev-server\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\bufferutil\build\bufferutil.vcxproj]
  PROJECT_PATH\node_modules\webpack-dev-server\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\bufferutil\node_modules\nan\nan.h(672): error C2665: 'node::Buffer::New' : none of the 4 overloads could convert all the argument types [PROJECT_PATH\node_modules\webpack-dev-server\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\bufferutil\build\bufferutil.vcxproj]
            C:\Users\VBakhmatiuk\.node-gyp\4.0.0\include\node\node_buffer.h(43): could be 'v8::MaybeLocal&lt;v8::Object&gt; node::Buffer::New(v8::Isolate *,char *,size_t)'
            C:\Users\VBakhmatiuk\.node-gyp\4.0.0\include\node\node_buffer.h(31): or       'v8::MaybeLocal&lt;v8::Object&gt; node::Buffer::New(v8::Isolate *,v8::Local&lt;v8::String&gt;,node::encoding)'
            while trying to match the argument list '(v8::Isolate *, const char *, uint32_t)'
  PROJECT_PATH\node_modules\webpack-dev-server\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\bufferutil\node_modules\nan\nan.h(676): error C2664: 'v8::Local&lt;v8::Object&gt;::Local(const v8::Local&lt;v8::Object&gt; &amp;)' : cannot convert argument 1 from 'v8::MaybeLocal&lt;v8::Object&gt;' to 'const v8::Local&lt;v8::Object&gt; &amp;' [PROJECT_PATH\node_modules\webpack-dev-server\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\bufferutil\build\bufferutil.vcxproj]
            Reason: cannot convert from 'v8::MaybeLocal&lt;v8::Object&gt;' to 'const v8::Local&lt;v8::Object&gt;'
            No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
  PROJECT_PATH\node_modules\webpack-dev-server\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\bufferutil\node_modules\nan\nan.h(683): error C2039: 'Use' : is not a member of 'node::Buffer' [PROJECT_PATH\node_modules\webpack-dev-server\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\bufferutil\build\bufferutil.vcxproj]
  PROJECT_PATH\node_modules\webpack-dev-server\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\bufferutil\node_modules\nan\nan.h(683): error C3861: 'Use': identifier not found [PROJECT_PATH\node_modules\webpack-dev-server\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\bufferutil\build\bufferutil.vcxproj]
  gyp ERR! build error
  gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\12.0\bin\msbuild.exe` failed with exit code: 1
  gyp ERR! stack     at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:270:23)
  gyp ERR! stack     at emitTwo (events.js:87:13)
  gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
  gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
  gyp ERR! System Windows_NT 6.1.7601
  gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
  gyp ERR! cwd PROJECT_PATH\node_modules\webpack-dev-server\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\bufferutil
  gyp ERR! node -v v4.0.0
  gyp ERR! node-gyp -v v3.0.1
  gyp ERR! not ok
  
  &gt; utf-8-validate@1.1.0 install PROJECT_PATH\node_modules\webpack-dev-server\node_modules\socket.io\node_modules\engine.io\node_modules\ws\node_modules\utf-8-validate
  &gt; node-gyp rebuild
  </code></pre>