我有一半的时间运行测试(npm测试),得到以下堆栈跟踪,这非常容易引起误解。知道我该如何解决吗?
/node_modules/raven/lib/client.js:217
kwargs.user = extend({}, this._globalContext.user, domainContext.user, kwargs.user);
^
TypeError: Cannot read property 'user' of undefined
at Raven.process (..node_modules/raven/lib/client.js:217:50)
at ..node_modules/raven/lib/client.js:375:12
at ..node_modules/raven/lib/parsers.js:55:5
at ..node_modules/raven/lib/utils.js:259:5
at ..node_modules/raven/lib/utils.js:169:35
at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:511:3)
答案 0 :(得分:0)
升级到@ sentry / node后,情况变得更好了,我的测试现在一直通过。