Node.js 在Nodester上使用bogart
TLDR:Node应用程序在本地工作,在Nodester.com上不工作,似乎是npm问题 详细版本: 我用bogart和couchdb编写了一个节点应用程序(基本上如下),它在本地运行良好 我使用在本地安装了节点扩展Node.js 在Nodester上使用bogart,node.js,npm,nodester,Node.js,Npm,Nodester,TLDR:Node应用程序在本地工作,在Nodester.com上不工作,似乎是npm问题 详细版本: 我用bogart和couchdb编写了一个节点应用程序(基本上如下),它在本地运行良好 我使用在本地安装了节点扩展 npm install bogart npm install couchdb 在Nodester上,我通过CLI将它们安装为 nodester npm install bogart couchdb 而且它返回了成功 现在我把我的工作代码推到Nodester.com回购协议上,
npm install bogart
npm install couchdb
在Nodester上,我通过CLI将它们安装为
nodester npm install bogart couchdb
而且它返回了成功
现在我把我的工作代码推到Nodester.com回购协议上,遇到了麻烦,脚本崩溃了,日志上说
Error: Cannot find module 'zlib'
at Function._resolveFilename (module.js:322:11)
at Function._load (module.js:267:25)
at require (module.js:351:19)
at Object.<anonymous> (/node_modules/bogart/lib/middleware.js:67:16)
at Function.<anonymous> (/node_modules/bogart/lib/middleware.js:781:15)
at /node_modules/bogart/lib/bogart.js:162:35
at Array.forEach (native)
at App.start (/node_modules/bogart/lib/bogart.js:155:21)
at Object.<anonymous> (/app/server.js:80:5)
at Module._compile (module.js:407:26)
它回来了
nodester info installing these npm packages: zlib
nodester > zlib@1.0.5 preinstall /node/app/username/repo/node_modules/zlib
nodester > node-waf clean || true; node-waf configure build
nodester zlib@1.0.5 ./node_modules/zlib
nodester Nothing to clean (project not configured)
nodester Setting srcdir to : /node/app/username/repo/node_modules/zlib
nodester Setting blddir to : /node/app/username/repo/node_modules/zlib/build
nodester Checking for program g++ or c++ : /usr/bin/g++
nodester Checking for program cpp : /usr/bin/cpp
nodester Checking for program ar : /usr/bin/ar
nodester Checking for program ranlib : /usr/bin/ranlib
nodester Checking for g++ : ok
nodester Checking for node path : not found
nodester Checking for node prefix : ok /usr
nodester Checking for library z : yes
nodester 'configure' finished successfully (0.128s)
nodester Waf: Entering directory `/node/app/username/repo/node_modules/zlib/build'
nodester [1/2] cxx: src/node-zlib.cc -> build/default/src/node-zlib_1.o
nodester ../src/node-zlib.cc: In function 'v8::Handle<v8::Value> ZLib_deflate(const v8::Arguments&)':
nodester ../src/node-zlib.cc:82: warning: left-hand operand of comma has no effect
nodester ../src/node-zlib.cc: In function 'v8::Handle<v8::Value> ZLib_inflate(const v8::Arguments&)':
nodester ../src/node-zlib.cc:83: warning: left-hand operand of comma has no effect
nodester [2/2] cxx_link: build/default/src/node-zlib_1.o -> build/default/zlib_bindings.node
nodester Waf: Leaving directory `/node/app/username/repo/node_modules/zlib/build'
nodester 'build' finished successfully (0.214s)
很抱歉出现了文字墙,但这有点奇怪,因为它在本地运行,没有任何问题,数据库连接和其他一切
类似问题
有什么想法吗?在nodester开发人员的帮助下,我现在可以解释为什么这个问题的修复目前不可用 0.6.x之前版本中Node.js的zlib库有时会导致某些节点模块出现问题(与绑定相关)。这是在0.6中修正的。尝试通过npm在0.4.x上安装pdfkit时也会出现类似问题 但是,Nodester目前(2012年2月底)运行在0.4.9(ish)上,目前正在开发对0.6.x或更高版本的支持。这意味着,在Nodester上运行不同版本的Node.js之前,bogart将不得不坐视不管
感谢Nodester的开发人员提供快速、广泛和迷人的支持。在Nodester开发人员的帮助下,我现在可以解释为什么此问题的修复目前不可用 0.6.x之前版本中Node.js的zlib库有时会导致某些节点模块出现问题(与绑定相关)。这是在0.6中修正的。尝试通过npm在0.4.x上安装pdfkit时也会出现类似问题 但是,Nodester目前(2012年2月底)运行在0.4.9(ish)上,目前正在开发对0.6.x或更高版本的支持。这意味着,在Nodester上运行不同版本的Node.js之前,bogart将不得不坐视不管
向Nodester的开发人员致敬,感谢他们快速、广泛和迷人的支持。研究:问题已在node 0.6.x中修复。然而,nodester目前在0.4.x上,所以我将不得不对此置之不理。然而,nodester目前在0.4.x上,所以我不得不坐视不理。
nodester info installing these npm packages: zlib
nodester > zlib@1.0.5 preinstall /node/app/username/repo/node_modules/zlib
nodester > node-waf clean || true; node-waf configure build
nodester zlib@1.0.5 ./node_modules/zlib
nodester Nothing to clean (project not configured)
nodester Setting srcdir to : /node/app/username/repo/node_modules/zlib
nodester Setting blddir to : /node/app/username/repo/node_modules/zlib/build
nodester Checking for program g++ or c++ : /usr/bin/g++
nodester Checking for program cpp : /usr/bin/cpp
nodester Checking for program ar : /usr/bin/ar
nodester Checking for program ranlib : /usr/bin/ranlib
nodester Checking for g++ : ok
nodester Checking for node path : not found
nodester Checking for node prefix : ok /usr
nodester Checking for library z : yes
nodester 'configure' finished successfully (0.128s)
nodester Waf: Entering directory `/node/app/username/repo/node_modules/zlib/build'
nodester [1/2] cxx: src/node-zlib.cc -> build/default/src/node-zlib_1.o
nodester ../src/node-zlib.cc: In function 'v8::Handle<v8::Value> ZLib_deflate(const v8::Arguments&)':
nodester ../src/node-zlib.cc:82: warning: left-hand operand of comma has no effect
nodester ../src/node-zlib.cc: In function 'v8::Handle<v8::Value> ZLib_inflate(const v8::Arguments&)':
nodester ../src/node-zlib.cc:83: warning: left-hand operand of comma has no effect
nodester [2/2] cxx_link: build/default/src/node-zlib_1.o -> build/default/zlib_bindings.node
nodester Waf: Leaving directory `/node/app/username/repo/node_modules/zlib/build'
nodester 'build' finished successfully (0.214s)
An error occurred.Object # has no method 'createGzip'
Stack Trace:
TypeError: Object # has no method 'createGzip' at /node_modules/bogart/lib/middleware.js:88:33 at notify (/node_modules/bogart/node_modules/promised-io/lib/promise.js:181:22) at notifyAll (/node_modules/bogart/node_modules/promised-io/lib/promise.js:164:5) at /node_modules/bogart/node_modules/promised-io/lib/promise.js:205:3 at notify (/node_modules/bogart/node_modules/promised-io/lib/promise.js:181:22) at [object Object].then (/node_modules/bogart/node_modules/promised-io/lib/promise.js:234:4) at notify (/node_modules/bogart/node_modules/promised-io/lib/promise.js:183:17) at notifyAll (/node_modules/bogart/node_modules/promised-io/lib/promise.js:164:5) at [object Object]. (/node_modules/bogart/node_modules/promised-io/lib/promise.js:211:3) at /node_modules/bogart/lib/middleware.js:347:22