简体   繁体   English

app.min.js:7错误:[$ rootScope:infdig]达到10个$ digest()迭代。 流产! 观察者在最近5次迭代中被解雇

[英]app.min.js:7 Error: [$rootScope:infdig] 10 $digest() iterations reached. Aborting! Watchers fired in the last 5 iterations

here is the error that the browser throws in each time I npm start my app. 这是每次我npm start我的应用程序时浏览器抛出的错误。
在此处输入图片说明

and here is my bower.json file: 这是我的bower.json文件:

{
    "name": "myapp",
    "version": "1.3.0",
    "authors": "My example",
    "description": "AngularJs Bootstrap example",
    "keywords": ["AngularJS", "admin", "admin", "dashboard", "admin", "panel", "app", "charts", "components", "flat", "flat", "ui", "responsive", "responsive", "layout", "ui", "kit", "ui", "route", "web", "app", "widgets"],
    "license": "ISC",
    "homepage": "http://example/com",
    "private": true,
    "ignore": ["**/.*", "node_modules", "bower_components", "test", "tests"],
    "dependencies": {

        "jquery": "~2.1.3",
        "fastclick": "~1.0.6",

        "angular": "~1.5.x",
        "angular-animate": "~1.5.x",
        "angular-cookies": "~1.5.x",
        "angular-resource": "~1.5.x",
        "angular-sanitize": "~1.5.x",
        "angular-touch": "~1.5.x",
        "angular-ui-router": "~0.3.x",
        "ngstorage": "~0.3.x",
        "angular-translate": "~2.11.x",
        "angular-translate-loader-url": "~2.11.x",
        "angular-translate-loader-static-files": "~2.11.x",
        "angular-translate-storage-cookie": "~2.11.x",
        "angular-translate-storage-local": "~2.11.x",
        "oclazyload": "~0.6.3",
        "angular-breadcrumb": "~0.4.x",
        "angular-bootstrap": "~1.1.x",
        "angular-loading-bar": "~0.9.x",
        "angular-scroll": "~1.0.x",
        "angular-moment": "~1.0.x",
        "AngularJS-Toaster": "~2.0.x",
        "angular-bootstrap-nav-tree": "*",
        "angular-ladda": "~0.4.x",
        "ng-table": "~0.5.4",
        "angular-ui-select": "~0.11.1",
        "angular-ui-utils": "mask-0.2.2",
        "ngImgCrop": "~0.3.2",
        "angular-file-upload": "~1.1.5",
        "angular-aside": "~1.1.3",
        "angular-truncate": "*",
        "angular-sweetalert-promised": "~1.0.4",
        "angular-elastic": "~2.4.2",
        "ngmap": "~1.4.2",
        "tc-angular-chartjs": "~1.0.9",
        "angular-ui-switch": "~0.1.0",
        "angular-ckeditor": "~0.3.2",
        "angular-bootstrap-calendar": "~0.7.0",
        "angular-xeditable": "~0.1.8",
        "checklist-model": "~0.2.4",
        "ng-nestable": "~0.0.1",
        "ng-flow": "~2.6.0",
        "v-accordion": "~1.2.1",

        "components-modernizr": "~2.8.3",
        "moment": "~2.8.3",
        "perfect-scrollbar": "~0.6.1",
        "ladda": "~0.9.7",
        "sweetalert": "~0.4.2",
        "chartjs": "~1.0.2",
        "jquery.sparkline.build": "~2.1.3",
        "ckeditor": "~4.4.7",
        "jquery-nestable": "v1.0",
        "spin.js": "~2.0.2",
        "bootstrap-touchspin": "~3.0.1",
        "select2": "~4.0.0",
        "select2-bootstrap-css": "~1.4.6",
        "selectize": "~0.12.0",

        "animate.css": "~3.2.0",
        "font-awesome": "~4.2.0",
        "themify-icons": "~0.1.0",
        "bootstrap": "~3.3.7",
        "bootstrap-rtl": "~3.3.1"
    },
    "resolutions": {
        "angular": "~1.5.x"
    }
}


when I run install my bower dependencies, I get a lot of prompts to choose which version of the packages I want to install. 当我运行安装Bower依赖项时,会收到很多提示来选择要安装的软件包版本。
Can somebody tell me where the problem lies actually? 有人可以告诉我问题出在哪里吗?

This is more likely due to the code in your application and is not related to your bower dependencies. 这很可能是由于应用程序中的代码引起的,并且与Bower依赖关系无关。 Can you post your code? 您可以发布代码吗?

You appear to be suffering from two separate problems. 您似乎正在遭受两个不同的问题。

The first is an angular error generated when angular detects that its digest cycle is being thrown into an infinite loop (you can read more about it here: https://docs.angularjs.org/error/ $rootScope/infdig). 第一个是角度错误,当角度检测到其摘要循环陷入无限循环时会生成一个角度错误(您可以在此处了解更多信息: https ://docs.angularjs.org/error/ $ rootScope / infdig)。 Check your code for issues where a watcher might be updating the value being watched or some other circular scope changes. 检查您的代码中是否存在观察者可能正在更新正在观察的值或某些其他循环范围更改的问题。

The second problem is regarding bower conflicts with your libraries. 第二个问题是与库的凉亭冲突。 Bower attempts to enforce a flat hierarchy among packages it clones, which is desirable in the browser because it reduces filesize/payload. Bower尝试在其克隆的软件包之间强制实施统一的层次结构,这在浏览器中是理想的,因为它减少了文件大小/有效负载。 But in order to do this, it has to make sure that it does not install multiple versions of various packages and it doesn't know which versions it should be using, so it requires input from the user to determine. 但是,为此,它必须确保不会安装各种软件包的多个版本,并且不知道应使用哪个版本,因此需要用户输入才能确定。 You most likely have many packages that are requesting conflicting versions of their dependencies. 您很可能有许多软件包正在请求相互依赖的版本冲突。 You can use the bower interface to select which version is your preference or do so manually ( How to resolve Bower dependency version conflicts? has good instructions for doing so). 您可以使用Bower界面来选择您喜欢的版本,也可以手动选择( 如何解决Bower依赖版本冲突?有很好的说明)。

Another thing you might try with bower is to use specific version numbers for your packages. 您可能会尝试使用Bower的另一件事是对软件包使用特定的版本号。 Using ~ or .x allows bower to include packages according to semver rules as explained here: What is the bower (and npm) version syntax? 使用〜或.x允许Bower根据semver规则包括程序包,如下所述: bower(和npm)版本的语法是什么? . This makes conflicts among dependencies more likely. 这使得依赖性之间的冲突更有可能发生。 It's also unusual to use both ~ and .x as they both perform the same function. 同时使用〜和.x也是不常见的,因为它们都执行相同的功能。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 JavaScript运行时错误:[$ rootScope:infdig]达到10个$ digest()迭代。 流产! 观察者在最近5次迭代中被解雇:[] - JavaScript runtime error: [$rootScope:infdig] 10 $digest() iterations reached. Aborting! Watchers fired in the last 5 iterations: [] JavaScript运行时错误:[$ rootScope:infdig]达到10个$ digest()迭代。 流产! 观察者在最近5次迭代中被解雇:[] - JavaScript runtime error:[$rootScope:infdig] 10 $digest() iterations reached. Aborting! Watchers fired in the last 5 iterations: [] AngularJS错误:$ rootScope:infdig无限$ digest循环:达到10个$ digest()迭代。 流产! 观察者在最近5次迭代中被解雇:[] - AngularJS Error: $rootScope:infdig Infinite $digest Loop: 10 $digest() iterations reached. Aborting! Watchers fired in the last 5 iterations: [] $ rootScope:infdig达到10个$ digest()迭代。 堕胎 - $rootScope:infdig 10 $digest() iterations reached. Aborting angular.js:10126错误:[$ rootScope:infdig]达到10个$ digest()迭代。 流产! nvd3 js错误 - angular.js:10126 Error: [$rootScope:infdig] 10 $digest() iterations reached. Aborting! error with nvd3 js Array.sort角度滤镜和“错误:[$ rootScope:infdig]达到10个$ digest()迭代。 中止!” - Array.sort angular filter and “Error: [$rootScope:infdig] 10 $digest() iterations reached. Aborting!” 要在给定的时间间隔后动态打印字母,错误:[$ rootScope:infdig]已达到10个$ digest()迭代。 流产!(…) - want to dynamically print letters after a given interval of time, Error: [$rootScope:infdig] 10 $digest() iterations reached. Aborting!(…) dxDataGrid使用ngResource触发所有类型的Web API的无限调用(错误:[$ rootScope:infdig]达到10个$ digest()迭代。正在中止!) - dxDataGrid trigger infinite call on web api of all type with ngResource (Error: [$rootScope:infdig] 10 $digest() iterations reached. Aborting!) Angular JS错误:达到10 $ digest()迭代。 中止 - Angular JS Error: 10 $digest() iterations reached. Aborting Angular JS:IE错误:达到10 $ digest()迭代。中止 - Angular JS: IE Error: 10 $digest() iterations reached. Aborting
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM