BBYR Achieve
返回信息流
这是一条镜像帖。来源:北邮人论坛 / www-technology / #30612同步于 2015/6/28
该镜像源已超过 30 天没有更新,可能在源站已被删除。
WWWTechnology机器人发帖

nodejs 开发指南 问题

bobogogo
2015/6/28镜像同步6 回复
最近在学习nodejs,运行微博工程一直报这个错误! 一直不得其解,发现是红色字体部分报错 app.use(session({ secret: settings.cookieSecret, store: new MongoStore({ db: settings.db, }) })); 下面是npm-debug.log全文,希望哪位大神指导: 0 info it worked if it ends with ok 1 verbose cli [ 'F:\\nodejs\\\\node.exe', 1 verbose cli 'F:\\nodejs\\node_modules\\npm\\bin\\npm-cli.js', 1 verbose cli 'start' ] 2 info using npm@2.10.0 3 info using node@v0.10.0 4 verbose node symlink F:\nodejs\\node.exe 5 verbose run-script [ 'prestart', 'start', 'poststart' ] 6 info prestart microblog@0.0.0 7 info start microblog@0.0.0 8 verbose unsafe-perm in lifecycle true 9 info microblog@0.0.0 Failed to exec start script 10 verbose stack Error: microblog@0.0.0 start: `node ./bin/www` 10 verbose stack Exit status 8 10 verbose stack at EventEmitter.<anonymous> (F:\nodejs\node_modules\npm\lib\utils\lifecycle.js:213:16) 10 verbose stack at EventEmitter.emit (events.js:98:17) 10 verbose stack at ChildProcess.<anonymous> (F:\nodejs\node_modules\npm\lib\utils\spawn.js:24:14) 10 verbose stack at ChildProcess.EventEmitter.emit (events.js:98:17) 10 verbose stack at maybeClose (child_process.js:700:16) 10 verbose stack at Process.ChildProcess._handle.onexit (child_process.js:767:5) 11 verbose pkgid microblog@0.0.0 12 verbose cwd E:\newnodejspro\microblog 13 error Windows_NT 5.1.2600 14 error argv "F:\\nodejs\\\\node.exe" "F:\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start" 15 error node v0.10.0 16 error npm v2.10.0 17 error code ELIFECYCLE 18 error microblog@0.0.0 start: `node ./bin/www` 18 error Exit status 8 19 error Failed at the microblog@0.0.0 start script 'node ./bin/www'. 19 error This is most likely a problem with the microblog package, 19 error not with npm itself. 19 error Tell the author that this fails on your system: 19 error node ./bin/www 19 error You can get their info via: 19 error npm owner ls microblog 19 error There is likely additional logging output above. 20 verbose exit [ 1, true ]
订阅后,新回复会通过你的通知中心匿名送达。
6 条回复
bswgd机器人#1 · 2015/6/28
把完整的代码贴一下吧。看上去像是连接mongodb数据库的时候出错了。但是没有源码也很难判断是什么错误。
biger机器人#2 · 2015/6/29
因为node更新太快
bobogogo机器人#3 · 2015/6/30
源码 只是express自动生成的 确实是链接mongodb的问题 我上传的app.use就是那一块的问题 【 在 bswgd 的大作中提到: 】 : 把完整的代码贴一下吧。看上去像是连接mongodb数据库的时候出错了。但是没有源码也很难判断是什么错误。
anthozoan77机器人#4 · 2015/6/30
当时也折腾mongodb好一阵子...
sangoly机器人#5 · 2015/6/30
这个可能会有帮助 http://blog.csdn.net/shi0090/article/details/22818121
bobogogo机器人#6 · 2015/6/30
谢谢 我看看 【 在 sangoly 的大作中提到: 】 : 这个可能会有帮助 http://blog.csdn.net/shi0090/article/details/22818121