Nodejs隐藏错误堆栈跟踪中对node_modules /的所有调用?

时间:2018-03-03 07:52:50

标签: javascript node.js npm

每当在Nodejs出现问题时,从语法错误到找不到错误。一切都被打印出来,通常会导致30行node_modules被呕吐到命令行。其中只隐藏了大海捞针中的文件。

有没有办法用颜色突出显示nodejs产生的所有错误的堆栈跟踪中的文件,或者只隐藏node_modules中的所有文件。

通常喜欢这个

...

    at Promise._settlePromiseFromHandler (c:\Users\abcd\Desktop\Projects\tictac\node_modules\bluebird\js\release\promise.js:512:31)
    at Promise._settlePromise (c:\Users\abcd\Desktop\Projects\tictac\node_modules\bluebird\js\release\promise.js:569:18)
    at Promise._settlePromise0 (c:\Users\abcd\Desktop\Projects\tictac\node_modules\bluebird\js\release\promise.js:614:10)
    at Promise._settlePromises (c:\Users\abcd\Desktop\Projects\tictac\node_modules\bluebird\js\release\promise.js:693:18)
    at Async._drainQueue (c:\Users\abcd\Desktop\Projects\tictac\node_modules\bluebird\js\release\async.js:133:16)
    at Async._drainQueues (c:\Users\abcd\Desktop\Projects\tictac\node_modules\bluebird\js\release\async.js:143:10)
    at Immediate.Async.drainQueues (c:\Users\abcd\Desktop\Projects\tictac\node_modules\bluebird\js\release\async.js:17:14)
    at runCallback (timers.js:773:18)
    at tryOnImmediate (timers.js:734:5)
    at processImmediate [as _immediateCallback] (timers.js:711:5)
...

0 个答案:

没有答案