Chrome浏览器在angular web应用中刷新grunt服务时出错

Chrome browser errors on refresh of grunt serve in angular web app

本文关键字:grunt 刷新 服务 出错 应用 浏览器 angular web Chrome      更新时间:2023-09-26

我正在制作一个单页angularjs应用程序,我分别使用grunt和bower作为开发服务器和依赖注入。我的应用程序在第一次从"grunt serve"命令加载时运行良好,但当我刷新页面时,我得到一串未捕获的类型和引用错误,应用程序无法加载:

Uncaught RangeError:超过最大调用堆栈大小jQuery -ui.js:14 Uncaught ReferenceError: jQuery is not defined$。jquery-ui.js:14(匿名函数)@ jquery-ui.js:16(index):1 Uncaught RangeError:超过最大调用堆栈大小Bootstrap .js:8未捕获错误:Bootstrap的JavaScript需要jQuery(匿名函数)@ Bootstrap .js:8angular- animation .js:9 Uncaught TypeError:无法读取undefined(匿名函数)的属性'noop' @ angular- animation .js:9(匿名函数)@ angular- animation .js:3721angular-cookies.js:24 Uncaught TypeError: Cannot read property 'module' of undefined(匿名函数)@ angular-cookies.js:24(匿名函数)@ angular-cookies.js:321@ angular-resource.js:8 Uncaught TypeError: Cannot read property '$$minErr' of undefined(匿名函数)@ angular-resource.js:8(匿名函数)@ angular-resource.js:669angular-route.js:24 Uncaught TypeError: Cannot read property 'module' of undefined(匿名函数)@ angular-route.js:24(匿名函数)@ angular-route.js:992未捕获的类型错误:无法读取未定义(匿名函数)的属性'module' @ angular-touch.js:28(匿名函数)@ angular-touch.js:628angular-chart.js:11 Uncaught ReferenceError: angular is not definedChart.defaults.global.responsive @ angular-chart.js:11angular-aria.js:57 Uncaught TypeError: Cannot read property 'module' of undefined(匿名函数)@ angular-aria.js:57(匿名函数)@ angular-aria.js:393angular- materials .js:13 Uncaught TypeError: Cannot read property 'module' of undefined(匿名函数)@ angular-material.js:13(匿名函数)@ angular-material.js:14(匿名函数)@ angular-material.js:17168angular-sanitize.js:19 Uncaught TypeError: Cannot read property '$$minErr' of undefined(匿名函数)@ angular-sanitize.js:19(匿名函数)@ angular-sanitize.js:683(index):1 Uncaught RangeError:超过最大调用堆栈大小jQuery .maskedinput.js:259 Uncaught ReferenceError: jQuery未定义(匿名函数)@ jQuery .maskedinput.js:259Uncaught ReferenceError: angular is not defined(匿名函数)@ app.js:11Uncaught ReferenceError: angular is not defined(匿名函数)@ admin.js:10Uncaught ReferenceError: angular is not defined(匿名函数)@ deployment.js:10Uncaught ReferenceError: angular is not defined(匿名函数Uncaught ReferenceError: angular is not defined(匿名函数)@ metrics.js:10Uncaught ReferenceError: angular is not defined(匿名函数)@ monitoring.js:10Uncaught ReferenceError: angular is not defined(匿名函数)@ reporting.js:10Uncaught ReferenceError: angular is not defined(匿名函数)@Uncaught ReferenceError: angular is not defined(匿名函数)@ support.service.js:2@ metrics.service.js:2 Uncaught ReferenceError: angular is not defined(匿名函数Uncaught ReferenceError: angular is not defined(匿名函数)@ monitoring.service.js:2(index):1 Uncaught RangeError: Maximum call stack size exceeded

有人经历过这种情况或知道解决方案吗?我认为这不是代码的问题

对于"超过的最大调用堆栈大小",您可能需要检查以下内容:http://gruntjs.com/frequently-asked-questions#why-am-i-getting-a-maximum-call-stack-size-exceeded-error