javascript - 警告 : Recursive process. 检测到 nextTick

标签 javascript node.js recursion gruntjs

我有应用程序,我正在开始使用它,我只想运行它,但它崩溃了。它使用运行 Node 服务器的 grunt,它是 Angular.js 应用程序。当我运行运行服务器的 grunt 任务时以及当我尝试从浏览器访问应用程序时,我收到来自 grunt 或 Node 的警告:

(node) warning: Recursive process.nextTick detected. This will break in the next
version of node. Please use setImmediate for recursive deferral.

很多行和最后:

util.js:35
  var str = String(f).replace(formatRegExp, function(x) {
                      ^
RangeError: Maximum call stack size exceeded Use --force to continue.

    Aborted due to warnings.

我尝试在我的应用程序中搜索 process.nextTick但在 node_modules 的很多地方都有目录,而不是 src .

是否可以删除该警告以便我可以运行该应用程序?我应该搜索这个递归调用的什么代码?

更新

我使用 ack并发现这一行来自这个文件的 3 个地方:

$REPO/node_modules/express/node_modules/connect/node_modules/multiparty/node_modules/‌​readable- stream/node_modules/core-util-is/float.patch
$REPO/node_modules/grunt-browser-sync/node_modules/browser-sync/node_modules/connect/‌​node_modu les/multiparty/node_modules/readable-stream/node_modules/core-util-is/float.patc‌​h 
/usr/lib/node_modules/bower/node_modules/decompress-zip/node_modules/readable-s‌​tream/nod e_modules/core-util-is/float.patch

但不是js文件。

最佳答案

这可能是一个棘手的问题。如果您的命名约定中存在重复,Grunt 将会呕吐。

这会中断:

grunt.registerTask('foo', [ 'foo']);

这不会:

grunt.registerTask('foo', [ 'bar']);

查看此 SO 帖子:grunt throw "Recursive process.nextTick detected"

关于javascript - 警告 : Recursive process. 检测到 nextTick,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22644709/

相关文章:

python - 检查字典中是否存在字典,如果存在则更改它

javascript - AngularJS:如何检测 $http 中是否没有响应

javascript - 将 JavaScript 放在 HTML 文件中的什么位置?

javascript - 每当加载新页面时,将 chrome 扩展写入 console.log 事件选项卡 URL

javascript - 如何迭代对象属性?

javascript - 使用 Socket.IO 表达 : Server doesn't receive emits from client

javascript - 如何在 jquery datetimepicker 插件中包含秒?

java - 递归调用方法期间 Hibernate session 关闭异常

javascript - 表达类型错误: undefined is not a function

linux - 递归重命名所有子目录中的 .jpg 文件