nodejs 出错堆栈 打不到 application 中行号?
wxianfeng-2:sms wangxianfeng$ node app
Express server listening on port 3000
buffer.js:236
throw new Error('First argument needs to be a number, ' +
^
Error: First argument needs to be a number, array or string.
at new Buffer (buffer.js:236:15)
at exports.weibo_login.base64Encode (/data/nodejs/sms/node_modules/sinalogin/lib/index.js:70:12)
at exports.weibo_login.getWeiboRsa (/data/nodejs/sms/node_modules/sinalogin/lib/index.js:79:12)
at async.iterator.fn (/data/nodejs/sms/node_modules/sinalogin/node_modules/async/lib/async.js:579:34)
at async.waterfall.wrapIterator (/data/nodejs/sms/node_modules/sinalogin/node_modules/async/lib/async.js:495:34)
at process.startup.processNextTick.process._tickCallback (node.js:244:9)
上面是我出错的 log, 堆栈始终只打印 module 中的代码, 我 项目中哪行代码导致的, 为什么没有呢?
2 回复
不是打出来了吗? at new Buffer (buffer.js:236:15) at exports.weibo_login.base64Encode
调用方法时错了吧,参数传错了
buffer.js 也是 module 中的, 我的程序是node app.js, 没打 app.js 中的行号.