[英]Error: Encountered undefined provider! Usually this means you have a circular dependencies (might be caused by using 'barrel' index.ts files
I dont know what causing this error.我不知道是什么导致了这个错误。 When I run
ionic server
command, It will display the following run time error.当我运行
ionic server
命令时,它会显示以下运行时错误。
Error: Encountered undefined provider! Usually this means you have a circular dependencies (might be caused by using 'barrel' index.ts files.
at syntaxError (http://192.168.0.115:8100/build/vendor.js:93699:34)
at http://192.168.0.115:8100/build/vendor.js:108838:40
at Array.forEach (<anonymous>)
at CompileMetadataResolver._getProvidersMetadata (http://192.168.0.115:8100/build/vendor.js:108823:19)
at CompileMetadataResolver.getNgModuleMetadata (http://192.168.0.115:8100/build/vendor.js:108393:50)
at JitCompiler._loadModules (http://192.168.0.115:8100/build/vendor.js:126717:87)
at JitCompiler._compileModuleAndComponents (http://192.168.0.115:8100/build/vendor.js:126678:36)
at JitCompiler.compileModuleAsync (http://192.168.0.115:8100/build/vendor.js:126594:37)
at CompilerImpl.compileModuleAsync (http://192.168.0.115:8100/build/vendor.js:92535:49)
at PlatformRef.bootstrapModule (http://192.168.0.115:8100/build/vendor.js:6107:25)
Ionic Framework: 3.9.2
Ionic App Scripts: 3.2.4
Angular Core: 5.0.0
Angular Compiler CLI: ^11.0.5
Node: 14.15.1
OS Platform: Windows 10
Navigator Platform: Win32
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36
Facing the error while running the project.运行项目时遇到错误。
This error is thrown when a part of your code depends on second piece of code, that in turn depends upon the first piece.当您的代码的一部分依赖于第二段代码时会引发此错误,而第二段代码又取决于第一段。 A simple example for this case would be if Service A calls a function of Service B but the function uses code in Service A. A cannot execute until B has finished executing, but B cannot execute unless A has finished executing.
这种情况的一个简单示例是,如果服务 A 调用服务 B 的 function,但 function 使用服务 A 中的代码。A 无法执行,直到 B 完成执行,但 B 无法执行,除非 A 完成执行。 Hence the term, cyclic dependency.
因此,术语,循环依赖。
The data you have provided is no where near sufficient to analyze the problem.您提供的数据远远不足以分析问题。 Kindly share more.
欢迎分享更多。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.