Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Cannot find module 'zlib' #155

Closed
mcfiredrill opened this Issue · 1 comment

1 participant

@mcfiredrill

I tried to follow the instructions, I ran 'npm install':

█▓▒░tony@kiwi░▒▓█ ~/src/subway(master)$ npm install
npm http GET https://registry.npmjs.org/express
npm http GET https://registry.npmjs.org/socket.io
npm http GET https://registry.npmjs.org/mongoose
npm http GET https://registry.npmjs.org/bcrypt
npm http GET https://registry.npmjs.org/jade
npm http GET https://registry.npmjs.org/connect-assets
npm http 200 https://registry.npmjs.org/bcrypt
npm http GET https://registry.npmjs.org/bcrypt/-/bcrypt-0.7.2.tgz
npm http 200 https://registry.npmjs.org/socket.io
npm http GET https://registry.npmjs.org/socket.io/-/socket.io-0.9.10.tgz
npm http 200 https://registry.npmjs.org/connect-assets
npm http 200 https://registry.npmjs.org/jade
npm http 200 https://registry.npmjs.org/bcrypt/-/bcrypt-0.7.2.tgz
npm http GET https://registry.npmjs.org/connect-assets/-/connect-assets-2.2.1.tgz
npm http GET https://registry.npmjs.org/jade/-/jade-0.26.3.tgz
npm http 200 https://registry.npmjs.org/express
npm http GET https://registry.npmjs.org/express/-/express-2.5.11.tgz
npm http 200 https://registry.npmjs.org/socket.io/-/socket.io-0.9.10.tgz
npm http 200 https://registry.npmjs.org/connect-assets/-/connect-assets-2.2.1.tgz
npm http 200 https://registry.npmjs.org/jade/-/jade-0.26.3.tgz
npm http 200 https://registry.npmjs.org/mongoose
npm http GET https://registry.npmjs.org/mongoose/-/mongoose-2.7.4.tgz
npm WARN package.json jade@0.26.3 No README.md file found!
npm http 200 https://registry.npmjs.org/express/-/express-2.5.11.tgz
npm http 200 https://registry.npmjs.org/mongoose/-/mongoose-2.7.4.tgz
npm http GET https://registry.npmjs.org/bindings/1.0.0
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/socket.io-client/0.9.10
npm http GET https://registry.npmjs.org/policyfile/0.0.4
npm http GET https://registry.npmjs.org/connect-file-cache/0.2.4
npm http GET https://registry.npmjs.org/mime/1.2.2
npm http GET https://registry.npmjs.org/commander/0.6.1
npm http GET https://registry.npmjs.org/mkdirp/0.3.0
npm http GET https://registry.npmjs.org/hooks/0.2.1
npm http GET https://registry.npmjs.org/mongodb/1.0.2
npm http GET https://registry.npmjs.org/qs
npm http GET https://registry.npmjs.org/redis/0.7.2
npm http GET https://registry.npmjs.org/snockets/1.3.6
npm http GET https://registry.npmjs.org/underscore/1.1.7
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/bindings/1.0.0
npm http GET https://registry.npmjs.org/bindings/-/bindings-1.0.0.tgz
npm http 200 https://registry.npmjs.org/socket.io-client/0.9.10
npm http GET https://registry.npmjs.org/socket.io-client/-/socket.io-client-0.9.10.tgz
npm http 200 https://registry.npmjs.org/connect-file-cache/0.2.4
npm http GET https://registry.npmjs.org/connect-file-cache/-/connect-file-cache-0.2.4.tgz
npm http 200 https://registry.npmjs.org/mime/1.2.2
npm http GET https://registry.npmjs.org/mime/-/mime-1.2.2.tgz
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/commander/0.6.1
npm http GET https://registry.npmjs.org/commander/-/commander-0.6.1.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/mongodb/1.0.2
npm http 200 https://registry.npmjs.org/qs
npm http GET https://registry.npmjs.org/qs/-/qs-0.4.2.tgz
npm http GET https://registry.npmjs.org/mongodb/-/mongodb-1.0.2.tgz
npm http 200 https://registry.npmjs.org/hooks/0.2.1
npm http 200 https://registry.npmjs.org/snockets/1.3.6
npm http GET https://registry.npmjs.org/hooks/-/hooks-0.2.1.tgz
npm http GET https://registry.npmjs.org/snockets/-/snockets-1.3.6.tgz
npm http 200 https://registry.npmjs.org/mime/-/mime-1.2.4.tgz
npm http 200 https://registry.npmjs.org/underscore/1.1.7
npm http GET https://registry.npmjs.org/underscore/-/underscore-1.1.7.tgz
npm http 200 https://registry.npmjs.org/redis/0.7.2
npm http GET https://registry.npmjs.org/redis/-/redis-0.7.2.tgz
npm http 200 https://registry.npmjs.org/policyfile/-/policyfile-0.0.4.tgz
npm http 200 https://registry.npmjs.org/bindings/-/bindings-1.0.0.tgz
npm http 200 https://registry.npmjs.org/connect-file-cache/-/connect-file-cache-0.2.4.tgz
npm http 200 https://registry.npmjs.org/socket.io-client/-/socket.io-client-0.9.10.tgz
npm http 200 https://registry.npmjs.org/mime/-/mime-1.2.2.tgz
npm http 200 https://registry.npmjs.org/commander/-/commander-0.6.1.tgz
npm http 200 https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.0.tgz
npm http 200 https://registry.npmjs.org/connect/-/connect-1.9.2.tgz
npm http 200 https://registry.npmjs.org/qs/-/qs-0.4.2.tgz
npm http 200 https://registry.npmjs.org/mongodb/-/mongodb-1.0.2.tgz
npm http 200 https://registry.npmjs.org/hooks/-/hooks-0.2.1.tgz
npm http 200 https://registry.npmjs.org/snockets/-/snockets-1.3.6.tgz
npm http 200 https://registry.npmjs.org/underscore/-/underscore-1.1.7.tgz
npm WARN package.json connect@1.9.2 No README.md file found!
npm http 200 https://registry.npmjs.org/redis/-/redis-0.7.2.tgz

> bcrypt@0.7.2 install /home/tony/src/subway/node_modules/bcrypt
> node-gyp rebuild

gyp http GET http://nodejs.org/dist/v0.8.9/node-v0.8.9.tar.gz
gyp http 200 http://nodejs.org/dist/v0.8.9/node-v0.8.9.tar.gz
npm http GET https://registry.npmjs.org/formidable
npm http GET https://registry.npmjs.org/coffee-script
npm http GET https://registry.npmjs.org/uglify-js/1.0.7
npm http GET https://registry.npmjs.org/dep-graph/1.1.0
npm WARN package.json mongodb@1.0.2 No README.md file found!
npm http 200 https://registry.npmjs.org/formidable
npm http GET https://registry.npmjs.org/formidable/-/formidable-1.0.11.tgz
npm http 200 https://registry.npmjs.org/uglify-js/1.0.7
npm http 200 https://registry.npmjs.org/dep-graph/1.1.0
npm http 200 https://registry.npmjs.org/coffee-script
npm http GET https://registry.npmjs.org/coffee-script/-/coffee-script-1.3.3.tgz
npm http GET https://registry.npmjs.org/uglify-js/-/uglify-js-1.0.7.tgz
npm http GET https://registry.npmjs.org/dep-graph/-/dep-graph-1.1.0.tgz
npm http 200 https://registry.npmjs.org/formidable/-/formidable-1.0.11.tgz
npm http 200 https://registry.npmjs.org/coffee-script/-/coffee-script-1.3.3.tgz
npm http 200 https://registry.npmjs.org/dep-graph/-/dep-graph-1.1.0.tgz
npm http 200 https://registry.npmjs.org/uglify-js/-/uglify-js-1.0.7.tgz
npm http GET https://registry.npmjs.org/bson/0.0.6
npm http GET https://registry.npmjs.org/hiredis
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.4.2
npm http GET https://registry.npmjs.org/active-x-obfuscator/0.0.1
npm http 200 https://registry.npmjs.org/bson/0.0.6
npm http GET https://registry.npmjs.org/bson/-/bson-0.0.6.tgz
make: Entering directory `/home/tony/src/subway/node_modules/bcrypt/build'
  CXX(target) Release/obj.target/bcrypt_lib/src/blowfish.o
npm http 200 https://registry.npmjs.org/hiredis
npm http 200 https://registry.npmjs.org/active-x-obfuscator/0.0.1
npm http GET https://registry.npmjs.org/hiredis/-/hiredis-0.1.14.tgz
npm http GET https://registry.npmjs.org/active-x-obfuscator/-/active-x-obfuscator-0.0.1.tgz
npm http GET https://registry.npmjs.org/underscore/1.2.1
npm http 200 https://registry.npmjs.org/bson/-/bson-0.0.6.tgz
npm http 200 https://registry.npmjs.org/uglify-js/1.2.5
npm http GET https://registry.npmjs.org/uglify-js/-/uglify-js-1.2.5.tgz
npm http 200 https://registry.npmjs.org/xmlhttprequest/1.4.2
npm http GET https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.4.2.tgz
npm http 200 https://registry.npmjs.org/active-x-obfuscator/-/active-x-obfuscator-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/hiredis/-/hiredis-0.1.14.tgz
npm http 200 https://registry.npmjs.org/ws
npm http 200 https://registry.npmjs.org/underscore/1.2.1
npm http GET https://registry.npmjs.org/underscore/-/underscore-1.2.1.tgz
npm http GET https://registry.npmjs.org/ws/-/ws-0.4.21.tgz
npm http 200 https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.4.2.tgz
npm WARN package.json hiredis@0.1.14 No README.md file found!
npm WARN package.json bson@0.0.6 No README.md file found!
npm http 200 https://registry.npmjs.org/underscore/-/underscore-1.2.1.tgz
npm http 200 https://registry.npmjs.org/ws/-/ws-0.4.21.tgz
  CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt.o
  CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt_node.o
  SOLINK_MODULE(target) Release/obj.target/bcrypt_lib.node
  SOLINK_MODULE(target) Release/obj.target/bcrypt_lib.node: Finished
  COPY Release/bcrypt_lib.node
make: Leaving directory `/home/tony/src/subway/node_modules/bcrypt/build'

> hiredis@0.1.14 preinstall /home/tony/src/subway/node_modules/socket.io/node_modules/redis/node_modules/hiredis
> make || gmake

cd deps/hiredis && make static
make[1]: Entering directory `/home/tony/src/subway/node_modules/socket.io/node_modules/redis/node_modules/hiredis/deps/hiredis'
cc -std=c99 -pedantic -c -O3 -fPIC  -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb net.c
cc -std=c99 -pedantic -c -O3 -fPIC  -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb hiredis.c

> bson@0.0.6 install /home/tony/src/subway/node_modules/mongoose/node_modules/mongodb/node_modules/bson
> node install.js

================================================================================
=                                                                              =
=  To install with C++ bson parser do <npm install mongodb --mongodb:native>   =
=                                                                              =
================================================================================
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
cc -std=c99 -pedantic -c -O3 -fPIC  -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb sds.c
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/options
npm http GET https://registry.npmjs.org/options/-/options-0.0.3.tgz
npm http 200 https://registry.npmjs.org/tinycolor
npm http GET https://registry.npmjs.org/tinycolor/-/tinycolor-0.0.1.tgz
npm http 200 https://registry.npmjs.org/commander
cc -std=c99 -pedantic -c -O3 -fPIC  -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb async.c
npm http 200 https://registry.npmjs.org/zeparser/-/zeparser-0.0.5.tgz
npm http 200 https://registry.npmjs.org/options/-/options-0.0.3.tgz
npm http 200 https://registry.npmjs.org/tinycolor/-/tinycolor-0.0.1.tgz

> ws@0.4.21 install /home/tony/src/subway/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws
> node install.js

[ws v0.4.21] Attempting to compile blazing fast native extensions.
ar rcs libhiredis.a net.o hiredis.o sds.o async.o
make[1]: Leaving directory `/home/tony/src/subway/node_modules/socket.io/node_modules/redis/node_modules/hiredis/deps/hiredis'
node-waf configure build
Setting srcdir to                        : /home/tony/src/subway/node_modules/socket.io/node_modules/redis/node_modules/hiredis 
Setting blddir to                        : /home/tony/src/subway/node_modules/socket.io/node_modules/redis/node_modules/hiredis/build 
Checking for program g++ or c++          : /usr/bin/g++ 
Checking for program cpp                 : /usr/bin/cpp 
Checking for program ar                  : /usr/bin/ar 
Checking for program ranlib              : /usr/bin/ranlib 
Checking for g++                         : ok  
Checking for node path                   : not found 
Checking for node prefix                 : ok /usr 
'configure' finished successfully (0.303s)
Waf: Entering directory `/home/tony/src/subway/node_modules/socket.io/node_modules/redis/node_modules/hiredis/build'
[1/3] cxx: hiredis.cc -> build/Release/hiredis_1.o
[2/3] cxx: reader.cc -> build/Release/reader_1.o
[3/3] cxx_link: build/Release/hiredis_1.o build/Release/reader_1.o -> build/Release/hiredis.node
Waf: Leaving directory `/home/tony/src/subway/node_modules/socket.io/node_modules/redis/node_modules/hiredis/build'
'build' finished successfully (5.159s)
[ws v0.4.21] Native extension compilation successful!
irc@0.3.4 node_modules/irc

jade@0.26.3 node_modules/jade
├── commander@0.6.1
└── mkdirp@0.3.0

express@2.5.11 node_modules/express
├── qs@0.4.2
├── mime@1.2.4
├── mkdirp@0.3.0
└── connect@1.9.2 (formidable@1.0.11)

bcrypt@0.7.2 node_modules/bcrypt
└── bindings@1.0.0

mongoose@2.7.4 node_modules/mongoose
├── hooks@0.2.1
└── mongodb@1.0.2 (bson@0.0.6)

connect-assets@2.2.1 node_modules/connect-assets
├── mime@1.2.2
├── connect-file-cache@0.2.4
├── underscore@1.1.7
└── snockets@1.3.6 (coffee-script@1.3.3, uglify-js@1.0.7, dep-graph@1.1.0)

socket.io@0.9.10 node_modules/socket.io
├── policyfile@0.0.4
├── redis@0.7.2 (hiredis@0.1.14)
└── socket.io-client@0.9.10 (xmlhttprequest@1.4.2, uglify-js@1.2.5, ws@0.4.21, active-x-obfuscator@0.0.1)

But I get an erorr about not finding zlib when I run node subway.

█▓▒░tony@kiwi░▒▓█ ~/src/subway(master)$ node subway 

node.js:134
        throw e; // process.nextTick error, or 'error' event on first tick
        ^
Error: Cannot find module 'zlib'
    at Function._resolveFilename (module.js:317:11)
    at Function._load (module.js:262:25)
    at require (module.js:346:19)
    at Object.<anonymous> (/home/tony/src/subway/node_modules/express/node_modules/connect/lib/middleware/compress.js:14:12)
    at Module._compile (module.js:402:26)
    at Object..js (module.js:408:10)
    at Module.load (module.js:334:31)
    at Function._load (module.js:293:12)
    at require (module.js:346:19)
    at Object.compress (/home/tony/src/subway/node_modules/express/node_modules/connect/lib/connect.js:89:14)

So I tried installing zlib(with npm install zlib) then I get the error:

█▓▒░tony@kiwi░▒▓█ ~/src/subway(master)$ node subway

node.js:134
        throw e; // process.nextTick error, or 'error' event on first tick
        ^
Error: Cannot find module './zlib_bindings'
    at Function._resolveFilename (module.js:317:11)
    at Function._load (module.js:262:25)
    at require (module.js:346:19)
    at Object.<anonymous> (/home/tony/src/subway/node_modules/zlib/lib/zlib.js:1:80)
    at Module._compile (module.js:402:26)
    at Object..js (module.js:408:10)
    at Module.load (module.js:334:31)
    at Function._load (module.js:293:12)
    at require (module.js:346:19)
    at Object.<anonymous> (/home/tony/src/subway/node_modules/express/node_modules/connect/lib/middleware/compress.js:14:12)
@mcfiredrill

Upgraded my version of node from v0.4.something to the latest, works now, sorry about that.

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.