1

尝试部署到 heroku,似乎 zlib 模块玩得不好。有任何想法吗?

2012-08-16T20:50:07+00:00 heroku[slugc]: Slug compilation finished
2012-08-16T20:50:09+00:00 heroku[web.1]: Starting process with command `node web.js`
2012-08-16T20:50:09+00:00 app[web.1]: 
2012-08-16T20:50:09+00:00 app[web.1]: node.js:134
2012-08-16T20:50:09+00:00 app[web.1]:         throw e; // process.nextTick error, or 'error' event on first tick
2012-08-16T20:50:09+00:00 app[web.1]:         ^
2012-08-16T20:50:09+00:00 app[web.1]: Error: Cannot find module 'zlib'
2012-08-16T20:50:09+00:00 app[web.1]:     at Function._resolveFilename (module.js:320:11)
2012-08-16T20:50:09+00:00 app[web.1]:     at Function._load (module.js:266:25)
2012-08-16T20:50:09+00:00 app[web.1]:     at require (module.js:348:19)
2012-08-16T20:50:09+00:00 app[web.1]:     at Object.<anonymous> (/app/node_modules/express/node_modules/connect/lib/middleware/compress.js:14:12)
2012-08-16T20:50:09+00:00 app[web.1]:     at Module._compile (module.js:404:26)
2012-08-16T20:50:09+00:00 app[web.1]:     at Object..js (module.js:410:10)
2012-08-16T20:50:09+00:00 app[web.1]:     at Module.load (module.js:336:31)
2012-08-16T20:50:09+00:00 app[web.1]:     at Function._load (module.js:297:12)
2012-08-16T20:50:09+00:00 app[web.1]:     at require (module.js:348:19)
2012-08-16T20:50:09+00:00 app[web.1]:     at Object.compress (/app/node_modules/express/node_modules/connect/lib/connect.js:89:14)
2012-08-16T20:50:11+00:00 heroku[web.1]: Process exited with status 1
2012-08-16T20:50:11+00:00 heroku[web.1]: State changed from starting to crashed
4

2 回答 2

1

原来 express 摆脱了它的 zlib 依赖,所以你必须将 zlib(版本“1.0”)添加到 /development/web 下的 package.json

更新:这已在 v1.4.11 中修复

于 2012-08-16T21:47:33.500 回答
1

这已在 Forge 平台的 v1.4.11 中修复:http: //docs.trigger.io/en/v1.4/release-notes.html#v1-4-11

感谢您的报告!

于 2012-08-22T17:20:01.960 回答