jedp / node-memwatch-demo

node-memwatch demo
67 stars 4 forks source link

npm install on Windows fails #1

Open hanxue opened 11 years ago

hanxue commented 11 years ago

OS: Windows 7 (64bit) SP1 Node: 0.8.16 NPM: 1.1.69

When I run npm install in the source folder, I get this error

E:\Projects\Learn\Node\memwatch\memwatch-demo\node-memwatch-demo>npm install
npm http GET https://registry.npmjs.org/express/2.5.10
npm http GET https://registry.npmjs.org/socket.io/0.9.6
npm WARN package.json memwatch@0.1.2 No README.md file found!
npm http 200 https://registry.npmjs.org/express/2.5.10
npm http GET https://registry.npmjs.org/express/-/express-2.5.10.tgz
npm http 200 https://registry.npmjs.org/socket.io/0.9.6
npm http GET https://registry.npmjs.org/socket.io/-/socket.io-0.9.6.tgz
npm http 200 https://registry.npmjs.org/express/-/express-2.5.10.tgz
npm http 200 https://registry.npmjs.org/socket.io/-/socket.io-0.9.6.tgz

> memwatch@0.1.2 install E:\Projects\Learn\Node\memwatch\memwatch-demo\node-memw
atch-demo\node_modules\memwatch
> make build

'make' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! memwatch@0.1.2 install: `make build`
npm ERR! `cmd "/c" "make build"` failed with 1
npm ERR!
npm ERR! Failed at the memwatch@0.1.2 install script.
npm ERR! This is most likely a problem with the memwatch package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     make build
npm ERR! You can get their info via:
npm ERR!     npm owner ls memwatch
npm ERR! There is likely additional logging output above.

npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nod
ejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! cwd E:\Projects\Learn\Node\memwatch\memwatch-demo\node-memwatch-demo
npm ERR! node -v v0.8.16
npm ERR! npm -v 1.1.69
npm ERR! code ELIFECYCLE
npm http GET https://registry.npmjs.org/connect
npm http GET https://registry.npmjs.org/mime/1.2.4
npm http GET https://registry.npmjs.org/qs
npm http GET https://registry.npmjs.org/mkdirp/0.3.0
npm http GET https://registry.npmjs.org/policyfile/0.0.4
npm http GET https://registry.npmjs.org/socket.io-client/0.9.6
npm http GET https://registry.npmjs.org/redis/0.6.7
npm http 200 https://registry.npmjs.org/mkdirp/0.3.0
npm http GET https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.0.tgz
npm http 200 https://registry.npmjs.org/mime/1.2.4
npm http GET https://registry.npmjs.org/mime/-/mime-1.2.4.tgz
npm http 200 https://registry.npmjs.org/policyfile/0.0.4
npm http GET https://registry.npmjs.org/policyfile/-/policyfile-0.0.4.tgz
npm http 200 https://registry.npmjs.org/qs
npm http GET https://registry.npmjs.org/qs/-/qs-0.4.2.tgz
npm http 200 https://registry.npmjs.org/redis/0.6.7
npm http GET https://registry.npmjs.org/redis/-/redis-0.6.7.tgz
npm http 200 https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.0.tgz
npm http 200 https://registry.npmjs.org/mime/-/mime-1.2.4.tgz
npm http 200 https://registry.npmjs.org/socket.io-client/0.9.6
npm http GET https://registry.npmjs.org/socket.io-client/-/socket.io-client-0.9.
6.tgz
npm http 200 https://registry.npmjs.org/policyfile/-/policyfile-0.0.4.tgz
npm http 200 https://registry.npmjs.org/qs/-/qs-0.4.2.tgz
npm http 200 https://registry.npmjs.org/redis/-/redis-0.6.7.tgz
npm http 200 https://registry.npmjs.org/socket.io-client/-/socket.io-client-0.9.
6.tgz
npm http 200 https://registry.npmjs.org/connect
npm http GET https://registry.npmjs.org/connect/-/connect-1.9.2.tgz
npm http 200 https://registry.npmjs.org/connect/-/connect-1.9.2.tgz
npm WARN package.json connect@1.9.2 No README.md file found!
npm http GET https://registry.npmjs.org/formidable
npm http 200 https://registry.npmjs.org/formidable
npm http GET https://registry.npmjs.org/formidable/-/formidable-1.0.11.tgz
npm WARN excluding symbolic link lib\socket.io-client.js -> io.js
npm http 200 https://registry.npmjs.org/formidable/-/formidable-1.0.11.tgz
npm http GET https://registry.npmjs.org/uglify-js/1.2.5
npm http GET https://registry.npmjs.org/ws
npm http GET https://registry.npmjs.org/xmlhttprequest/1.2.2
npm http GET https://registry.npmjs.org/active-x-obfuscator/0.0.1
npm http 200 https://registry.npmjs.org/active-x-obfuscator/0.0.1
npm http 200 https://registry.npmjs.org/xmlhttprequest/1.2.2
npm http 200 https://registry.npmjs.org/uglify-js/1.2.5
npm http GET https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.2.2.tg
z
npm http GET https://registry.npmjs.org/uglify-js/-/uglify-js-1.2.5.tgz
npm http GET https://registry.npmjs.org/active-x-obfuscator/-/active-x-obfuscato
r-0.0.1.tgz
npm http 200 https://registry.npmjs.org/ws
npm http GET https://registry.npmjs.org/ws/-/ws-0.4.25.tgz
npm http 200 https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.2.2.tg
z
npm http 200 https://registry.npmjs.org/active-x-obfuscator/-/active-x-obfuscato
r-0.0.1.tgz
npm http 200 https://registry.npmjs.org/uglify-js/-/uglify-js-1.2.5.tgz
npm http 200 https://registry.npmjs.org/ws/-/ws-0.4.25.tgz
npm http GET https://registry.npmjs.org/zeparser/0.0.5
npm http GET https://registry.npmjs.org/commander
npm http GET https://registry.npmjs.org/tinycolor
npm http GET https://registry.npmjs.org/options
npm http 200 https://registry.npmjs.org/zeparser/0.0.5
npm http GET https://registry.npmjs.org/zeparser/-/zeparser-0.0.5.tgz
npm http 200 https://registry.npmjs.org/tinycolor
npm http 200 https://registry.npmjs.org/options
npm http GET https://registry.npmjs.org/tinycolor/-/tinycolor-0.0.1.tgz
npm http GET https://registry.npmjs.org/options/-/options-0.0.3.tgz
npm http 200 https://registry.npmjs.org/commander
npm http GET https://registry.npmjs.org/commander/-/commander-0.6.1.tgz
npm http 200 https://registry.npmjs.org/zeparser/-/zeparser-0.0.5.tgz
npm http 200 https://registry.npmjs.org/tinycolor/-/tinycolor-0.0.1.tgz
npm http 200 https://registry.npmjs.org/options/-/options-0.0.3.tgz
npm http 200 https://registry.npmjs.org/commander/-/commander-0.6.1.tgz

> ws@0.4.25 install E:\Projects\Learn\Node\memwatch\memwatch-demo\node-memwatch-
demo\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)

E:\Projects\Learn\Node\memwatch\memwatch-demo\node-memwatch-demo\node_modules\so
cket.io\node_modules\socket.io-client\node_modules\ws>node "C:\Program Files\nod
ejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.
js" rebuild
Building the projects in this solution one at a time. To enable parallel build,
please add the "/m" switch.
  bufferutil.cc
c:\users\hanxue\.node-gyp\0.8.16\deps\uv\include\ares.h(49): fatal error C1083:
 Cannot open include file: 'winsock2.h': No such file or directory [E:\Projects
\Learn\Node\memwatch\memwatch-demo\node-memwatch-demo\node_modules\socket.io\no
de_modules\socket.io-client\node_modules\ws\build\bufferutil.vcxproj]
  validation.cc
c:\users\hanxue\.node-gyp\0.8.16\deps\uv\include\ares.h(49): fatal error C1083:
 Cannot open include file: 'winsock2.h': No such file or directory [E:\Projects
\Learn\Node\memwatch\memwatch-demo\node-memwatch-demo\node_modules\socket.io\no
de_modules\socket.io-client\node_modules\ws\build\validation.vcxproj]
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     E:\Projects\Learn\Node\memwatch\memwatch-demo\node-memwatch-demo\np
m-debug.log
npm ERR! not ok code 0

The relevant npm debug log lines are:

638 info install memwatch@0.1.2
639 verbose unsafe-perm in lifecycle true
640 silly exec cmd "/c" "make build"
641 silly cmd,/c,make build,E:\Projects\Learn\Node\memwatch\memwatch-demo\node-memwatch-demo\node_modules\memwatch spawning
642 info memwatch@0.1.2 Failed to exec install script
643 info E:\Projects\Learn\Node\memwatch\memwatch-demo\node-memwatch-demo\node_modules\memwatch unbuild
644 verbose from cache E:\Projects\Learn\Node\memwatch\memwatch-demo\node-memwatch-demo\node_modules\memwatch\package.json
645 info preuninstall memwatch@0.1.2
646 info uninstall memwatch@0.1.2
647 verbose true,E:\Projects\Learn\Node\memwatch\memwatch-demo\node-memwatch-demo\node_modules,E:\Projects\Learn\Node\memwatch\memwatch-demo\node-memwatch-demo\node_modules unbuild memwatch@0.1.2
648 info postuninstall memwatch@0.1.2
649 error memwatch@0.1.2 install: `make build`
649 error `cmd "/c" "make build"` failed with 1
650 error Failed at the memwatch@0.1.2 install script.
650 error This is most likely a problem with the memwatch package,
650 error not with npm itself.
650 error Tell the author that this fails on your system:
650 error     make build
650 error You can get their info via:
650 error     npm owner ls memwatch
650 error There is likely additional logging output above.
651 error System Windows_NT 6.1.7601
652 error command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
653 error cwd E:\Projects\Learn\Node\memwatch\memwatch-demo\node-memwatch-demo
654 error node -v v0.8.16
655 error npm -v 1.1.69
656 error code ELIFECYCLE
657 verbose exit [ 1, true ]
jedp commented 11 years ago

Hi, @hanxue. Thanks for the full report. It looks like it's failing to find winsock2.h when trying to build socket.io. Perhaps there is a path configuration issue in your environment? Or you don't have winsock2.h on your system?

I see you've encountered the same problem in a different project: https://github.com/einaros/ws/issues/146, which makes it sound more like a configuration issue in your environment.

Are you able to npm install socket.io on its own?

meteormatt commented 10 years ago

@jedp I have the same problem. But I can install socket.io. Only node-gcstats can not install. Maybe because memwatch? Becasue I see you use git://github.com/jedp/node-memwatch#incremental which is version 0.1.2. I can install version 0.2.2, but can not install 0.1.2.

PS D:\workspace_git\node-memwatch-demo> npm ls
leaky@0.0.1 D:\workspace_git\node-memwatch-demo
├─┬ express@2.5.10
│ ├─┬ connect@1.9.2
│ │ └── formidable@1.0.14
│ ├── mime@1.2.4
│ ├── mkdirp@0.3.0
│ └── qs@0.4.2
├── UNMET DEPENDENCY node-gcstats git://github.com/jedp/node-memwatch#incremental
└─┬ socket.io@0.9.6
  ├── policyfile@0.0.4
  ├── redis@0.6.7
  └─┬ socket.io-client@0.9.6
    ├─┬ active-x-obfuscator@0.0.1
    │ └── zeparser@0.0.5
    ├── uglify-js@1.2.5
    ├─┬ ws@0.4.31
    │ ├── commander@0.6.1
    │ ├── nan@0.3.2
    │ ├── options@0.0.5
    │ └── tinycolor@0.0.1
    └── xmlhttprequest@1.2.2

npm ERR! missing: node-gcstats@git://github.com/jedp/node-memwatch#incremental, required by leaky@0.0.1
npm ERR! not ok code 0
PS D:\workspace_git\node-memwatch-demo>

snap2

PS D:\workspace_git\node-memwatch-demo> npm install memwatch@0.1.2
npm http GET https://registry.npmjs.org/memwatch/0.1.2
npm http 200 https://registry.npmjs.org/memwatch/0.1.2
npm http GET https://registry.npmjs.org/memwatch/-/memwatch-0.1.2.tgz
npm http 200 https://registry.npmjs.org/memwatch/-/memwatch-0.1.2.tgz

> memwatch@0.1.2 install D:\workspace_git\node-memwatch-demo\node_modules\memwatch
> make build

'make' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
npm ERR! memwatch@0.1.2 install: `make build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the memwatch@0.1.2 install script.
npm ERR! This is most likely a problem with the memwatch package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     make build
npm ERR! You can get their info via:
npm ERR!     npm owner ls memwatch
npm ERR! There is likely additional logging output above.

npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\
\npm-cli.js" "install" "memwatch@0.1.2"
npm ERR! cwd D:\workspace_git\node-memwatch-demo
npm ERR! node -v v0.10.22
npm ERR! npm -v 1.3.14
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     D:\workspace_git\node-memwatch-demo\npm-debug.log
npm ERR! not ok code 0
PS D:\workspace_git\node-memwatch-demo> npm install memwatch
npm http GET https://registry.npmjs.org/memwatch
npm http 304 https://registry.npmjs.org/memwatch

> memwatch@0.2.2 install D:\workspace_git\node-memwatch-demo\node_modules\memwatch
> node-gyp rebuild

D:\workspace_git\node-memwatch-demo\node_modules\memwatch>node "C:\Program Files (x86)\nodejs\node_modules\npm\bin\node-
gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild
在此解决方案中一次生成一个项目。若要启用并行生成,请添加“/m”开关。
  heapdiff.cc
  memwatch.cc
  util.cc
  init.cc
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xlocale(323): warning C4530: C++ exception handler used,
 but unwind semantics are not enabled. Specify /EHsc [D:\workspace_git\node-memwatch-demo\node_modules\memwatch\build\m
emwatch.vcxproj]
c:\users\meteor\.node-gyp\0.10.22\deps\v8\include\v8.h(218): warning C4506: no definition for inline function 'v8::Pers
istent<T> v8::Persistent<T>::New(v8::Handle<T>)' [D:\workspace_git\node-memwatch-demo\node_modules\memwatch\build\memwa
tch.vcxproj]
          with
          [
              T=v8::Object
          ]
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xlocale(323): warning C4530: C++ exception handler used,
 but unwind semantics are not enabled. Specify /EHsc [D:\workspace_git\node-memwatch-demo\node_modules\memwatch\build\m
emwatch.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xlocale(323): warning C4530: C++ exception handler used,
 but unwind semantics are not enabled. Specify /EHsc [D:\workspace_git\node-memwatch-demo\node_modules\memwatch\build\m
emwatch.vcxproj]
..\src\memwatch.cc(72): warning C4244: 'initializing' : conversion from 'time_t' to 'size_t', possible loss of data [D:
\workspace_git\node-memwatch-demo\node_modules\memwatch\build\memwatch.vcxproj]
..\src\memwatch.cc(73): warning C4244: 'initializing' : conversion from 'time_t' to 'int', possible loss of data [D:\wo
rkspace_git\node-memwatch-demo\node_modules\memwatch\build\memwatch.vcxproj]
..\src\memwatch.cc(74): warning C4244: 'initializing' : conversion from 'time_t' to 'int', possible loss of data [D:\wo
rkspace_git\node-memwatch-demo\node_modules\memwatch\build\memwatch.vcxproj]
..\src\memwatch.cc(84): warning C4244: 'argument' : conversion from 'double' to 'int', possible loss of data [D:\worksp
ace_git\node-memwatch-demo\node_modules\memwatch\build\memwatch.vcxproj]
..\src\memwatch.cc(147): warning C4244: '=' : conversion from 'double' to 'unsigned int', possible loss of data [D:\wor
kspace_git\node-memwatch-demo\node_modules\memwatch\build\memwatch.vcxproj]
..\src\memwatch.cc(152): warning C4244: '=' : conversion from 'double' to 'unsigned int', possible loss of data [D:\wor
kspace_git\node-memwatch-demo\node_modules\memwatch\build\memwatch.vcxproj]
..\src\memwatch.cc(159): warning C4244: '=' : conversion from 'double' to 'unsigned int', possible loss of data [D:\wor
kspace_git\node-memwatch-demo\node_modules\memwatch\build\memwatch.vcxproj]
c:\users\meteor\.node-gyp\0.10.22\deps\v8\include\v8.h(184): warning C4506: no definition for inline function 'v8::Pers
istent<T> v8::Persistent<T>::New(v8::Handle<T>)' [D:\workspace_git\node-memwatch-demo\node_modules\memwatch\build\memwa
tch.vcxproj]
          with
          [
              T=v8::Object
          ]
..\src\heapdiff.cc(279): warning C4244: 'argument' : conversion from 'unsigned __int64' to 'v8::SnapshotObjectId', poss
ible loss of data [D:\workspace_git\node-memwatch-demo\node_modules\memwatch\build\memwatch.vcxproj]
..\src\heapdiff.cc(291): warning C4244: 'argument' : conversion from 'unsigned __int64' to 'v8::SnapshotObjectId', poss
ible loss of data [D:\workspace_git\node-memwatch-demo\node_modules\memwatch\build\memwatch.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xmemory(196): warning C4506: no definition for inline fu
nction 'v8::Persistent<T> v8::Persistent<T>::New(v8::Handle<T>)' [D:\workspace_git\node-memwatch-demo\node_modules\memw
atch\build\memwatch.vcxproj]
          with
          [
              T=v8::Object
          ]
     Creating library D:\workspace_git\node-memwatch-demo\node_modules\memwatch\build\Release\memwatch.lib and object D
  :\workspace_git\node-memwatch-demo\node_modules\memwatch\build\Release\memwatch.exp
  Generating code
  Finished generating code
  memwatch.vcxproj -> D:\workspace_git\node-memwatch-demo\node_modules\memwatch\build\Release\\memwatch.node
memwatch@0.2.2 node_modules\memwatch
PS D:\workspace_git\node-memwatch-demo>