Tag: 警告

如何find哪些promise在nodejs中未处理UnhandledPromiseRejectionWarning?

从版本7的nodejs有asynchronous等待处理承诺的sintactic糖,在我的apis下面的警告经常出现: (node:11057) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): ReferenceError: Error: Can't set headers after they are sent. (node:11057) DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. 不幸的是,没有提到渔获缺失的地方。 有没有办法find它没有检查每个try catch块?

jade文件中显示节点服务器中的警告

我有很多  s'在我的玉文件中,当我运行节点服务器时显示为警告: Warning: missing space before text for line 210 of jade file "C:\Users\XX\Documents\GitHub\XXX\XX\registerPage.jade" 这个警告显示在哪里有一个  ,我不想要它,因为从服务器生成的日志文件充满了这些警告。

npm WARN弃用xxx:我该怎么办?

我已经使用了几年的咕噜声,而且一直如此,我已经看到如下的警告: npm WARN deprecated win-spawn@2.0.0: use [cross-spawn](https://github.com/IndigoUnited/node-cross-spawn) or [cross-spawn-async](https://github.com/IndigoUnited/node-cross-spawn-async) instead. npm WARN deprecated lodash@0.9.2: lodash@<2.0.0 is no longer maintained. Upgrade to lodash@^3.0.0 npm WARN deprecated lodash@1.0.2: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^4.0.0. npm WARN deprecated graceful-fs@1.2.3: graceful-fs v3.0.0 and before will fail on node releases >= v6.0. Please update to graceful-fs@^4.0.0 as soon […]

node.js中出现的这个错误是什么?

我试图按照这个教程 。 然后当我到这个部分 node jsctags/bin/jsctags –sort=yes –locals tst.js 我收到以下警告消息。 “sys”模块现在称为“util”。 它应该有一个类似的界面。 我在OSX中这样做。 首先我尝试了这个包,然后尝试从源代码安装。 我仍然得到相同的信息。 这是什么意思? 我能做些什么呢?

在链中捕获,但使用节点6获得UnhandledPromiseRejectionWarning

我有这个承诺链。 com.openPort(port).then(port => { _.pTimeout(3000, com.sendPort(port, NCD.gen(args.cmd))) .then(received => { console.log('complete response: ', NCD.parse(received)); Debug.L1('resolved num data listeners: ', port.listenerCount("data")); }) }) .catch(function(e) { console.log('error: ', e) }); 我正在通过发送一个伪造的命令来testing超时的承诺,这将使sendPort的承诺得不到解决。 超时承诺赢得比赛投掷拒绝,但警告之前.catch处理拒绝。 这里是超时承诺比赛 pTimeout: function(timeout, promise) { return Promise.race([ promise, new Promise(function(resolve, reject) { setTimeout(function() { reject('\nTimed out'); }, timeout); }) ]); } 控制台显示 (node:9616) UnhandledPromiseRejectionWarning: Unhandled […]