简体   繁体   English

遇到未定义的提供者! 通常,这意味着您有说谎感。 这可能是由于使用“桶” index.ts文件引起的

[英]Encountered undefined provider! Usually this means you have cies. This might be caused by using 'barrel' index.ts files

this is the error which i get in production build 这是我在生产版本中遇到的错误 在此处输入图片说明在此处输入图片说明

by using Layout Module.ts file as child where all the inner pages are included and ,app module.ts as parent including only the app component.ts file ,whenever I use (ng build --prod) 每当我使用(ng build --prod)时,通过将Layout Module.ts文件用作包含所有内部页面的子级文件,将appmodule.ts作为仅包含app component.ts文件的父级文件

it show : /error message as/ 它显示:/错误消息为/

circular dependencies (might be caused by using 'barrel' index.ts files. 循环依赖关系(可能是由于使用“ barrel” index.ts文件引起的。

I know it's hard to post the whole project because this issue more or less relates to the circular dependencies injection. 我知道很难发布整个项目,因为这个问题或多或少与循环依赖注入有关。 This usually happens like, for example, you have 3 files a.ts , b.ts , c.ts and a import b, b import c and c import a . 这通常发生,例如,您有3个文件a.tsb.tsc.tsa import b, b import c and c import a Or even more. 甚至更多。

So my suggestion to debug this case is to check if your ts files to find out the circular loop. 所以我建议调试这种情况是检查您的ts文件是否找出循环。

暂无
暂无

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

相关问题 遇到未定义的提供者! 通常这意味着你有一个循环依赖(可能是由使用“桶” index.ts 文件引起的 - Encountered undefined provider! Usually this means you have a circular dependencies (might be caused by using 'barrel' index.ts files Ionic 3“遇到未定义的提供商! 通常这意味着你有一个循环依赖“可能是由于使用'桶'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 文件引起的 - Error: Encountered undefined provider! Usually this means you have a circular dependencies (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