简体   繁体   English

错误:遇到未定义的提供程序。 通常这意味着你有一个循环依赖(可能是由使用'桶' index.ts 文件引起的

[英]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.

相关问题 Ionic 3“遇到未定义的提供商! 通常这意味着你有一个循环依赖“可能是由于使用&#39;桶&#39;index.ts文件引起的 - Ionic 3 “Encountered undefined provider! Usually this means you have a circular dependencies” might be caused by using 'barrel' index.ts files 遇到未定义的提供者! 通常这意味着你有一个循环依赖(可能是由使用“桶” index.ts 文件引起的 - Encountered undefined provider! Usually this means you have a circular dependencies (might be caused by using 'barrel' index.ts files 遇到未定义的提供者! 通常,这意味着您有说谎感。 这可能是由于使用“桶” index.ts文件引起的 - Encountered undefined provider! Usually this means you have cies. This might be caused by using 'barrel' index.ts files 错误:“遇到未定义的提供程序! 通常这意味着你有一个循环依赖” - Error: “Encountered undefined provider! Usually this means you have a circular dependencies” ionic3&angular4遇到未定义的提供程序! 通常这意味着您具有循环依赖关系 - ionic3&angular4 Encountered undefined provider! Usually this means you have a circular dependencies Barrel(index.ts)是否已从Angular 6中弃用? - Is Barrel (index.ts) deprecated from Angular 6? 使用index.ts文件导出类会导致注入的构造函数中的undefined - Using index.ts file to export class causes undefined in injected constructor 未生成Index.ts - Index.ts not being generated 正则表达式:所有以.ts结尾且没有单词index.ts和test.ts的字符串 - Regex: All strings that finishes with .ts and does not have the word index.ts and test.ts 在Typescript中使用index.ts是否会对性能产生影响-Ionic App - Is there any performance impact using index.ts in Typescript - Ionic App
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM