mnutt / hummingbird

Real time web analytics using node.js and web sockets
http://mnutt.github.com/hummingbird
MIT License
2.92k stars 15 forks source link

Fix the npm install issue #53

Closed xinbenlv closed 10 years ago

xinbenlv commented 11 years ago

If the you have encounter the problem when installing it. You can consider pull this commit

npm install 
npm WARN package.json node-static@0.5.9 No repository field.
npm http GET https://registry.npmjs.org/geoip-no-city-leak/0.4.9-1
npm http GET https://registry.npmjs.org/socket.io/0.9.6
npm http 304 https://registry.npmjs.org/geoip-no-city-leak/0.4.9-1
npm http 304 https://registry.npmjs.org/socket.io/0.9.6

> geoip-no-city-leak@0.4.9-1 install /Users/zzn/ws/siyuan/hummingbird/node_modules/geoip-no-city-leak
> node-gyp rebuild

npm http GET https://registry.npmjs.org/redis/0.6.7
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 304 https://registry.npmjs.org/redis/0.6.7
npm http 304 https://registry.npmjs.org/policyfile/0.0.4
npm WARN package.json policyfile@0.0.4 No repository field.
npm WARN package.json policyfile@0.0.4 'repositories' (plural) Not supported.
npm WARN package.json Please pick one as the 'repository' field
  CXX(target) Release/obj.target/geoip/src/city.o
npm http 304 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
In file included from ../src/city.cc:7:
../src/city.h:12:10: fatal error: 'GeoIPCity.h' file not found
#include 
         ^
1 error generated.
make: *** [Release/obj.target/geoip/src/city.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/Cellar/node/0.10.12/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
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 Darwin 12.4.0
gyp ERR! command "node" "/usr/local/Cellar/node/0.10.12/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/zzn/ws/siyuan/hummingbird/node_modules/geoip-no-city-leak
gyp ERR! node -v v0.10.12
gyp ERR! node-gyp -v v0.10.0
gyp ERR! not ok
npm ERR! weird error 1
npm http 200 https://registry.npmjs.org/socket.io-client/-/socket.io-client-0.9.6.tgz
npm ERR! not ok code 0
13:36:45 zzn@zzn-macbookpro ⮁ ~ ⮁ ws ⮁ siyuan ⮁ hummingbird ⮀ master ⮀ $ ⮀npm install geoip-no-city-leak
npm WARN package.json node-static@0.5.9 No repository field.
npm http GET https://registry.npmjs.org/geoip-no-city-leak/0.4.9-1
npm http 304 https://registry.npmjs.org/geoip-no-city-leak/0.4.9-1

> geoip-no-city-leak@0.4.9-1 install /Users/zzn/ws/siyuan/hummingbird/node_modules/geoip-no-city-leak
> node-gyp rebuild

  CXX(target) Release/obj.target/geoip/src/city.o
In file included from ../src/city.cc:7:
../src/city.h:12:10: fatal error: 'GeoIPCity.h' file not found
#include 
         ^
1 error generated.
make: *** [Release/obj.target/geoip/src/city.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/Cellar/node/0.10.12/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
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 Darwin 12.4.0
gyp ERR! command "node" "/usr/local/Cellar/node/0.10.12/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/zzn/ws/siyuan/hummingbird/node_modules/geoip-no-city-leak
gyp ERR! node -v v0.10.12
gyp ERR! node-gyp -v v0.10.0
gyp ERR! not ok
npm ERR! weird error 1
npm ERR! not ok code 0
basiamucha commented 11 years ago

Should the package.json actually have var geoip = require('geoip'); or var geoip = require('geoip-no-city-leak');.

It seems like var geoip = require('geoip-no-city-leak') does not work due to error: ../src/city.h:12:10: fatal error: 'GeoIPCity.h' file not found

gh-naylor commented 11 years ago

On Mac OSX I'm also getting 'GeoIPCity.h' file not found. Even after running brew install libgeoip.

mnutt commented 10 years ago

Sorry for not getting to this sooner. It looks like the geoip memory leak issues have been resolved and they now bundle libgeoip, so this should hopefully fix everyone's dependency issues.