无法使用Ivy将@Input装饰器与查询装饰器组合 [英] Cannot combine @Input decorators with query decorators using Ivy

查看:211
本文介绍了无法使用Ivy将@Input装饰器与查询装饰器组合的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经将我的angular 7应用程序迁移到了8.0.0,现在我正在尝试新的编译器常春藤.

I have migrated my angular 7 app to 8.0.0 and i'am now trying the new compiler ivy.

该应用程序在没有常春藤的情况下可以完美运行,但是当我尝试使用它编译时,出现以下错误:

The app works perfectly without ivy but when i try to compile with it i have the following error :

不能将@Input装饰器与查询装饰器组合

Cannot combine @Input decorators with query decorators

没有行号,没有文件,没有任何东西……很难调试任何东西.

No line number , no file , nothing ... hard to debug anything.

在此之前我有警告,但是我不知道是否相关:

I have warning just before that , but i don't know if it's related :

警告入口点"angular-tree-component"包含深层导入 进入'lodash/defaultsDeep','lodash/get','lodash/omit', 'lodash/isNumber','lodash/first','lodash/last','lodash/some', 'lodash/every','lodash/compact','lodash/find','lodash/isString', 'lodash/isFunction','lodash/throttle','lodash/includes', "lodash/pick".这可能不是问题,但可能会导致 入口点的编译会出现问题.

WARNING in Entry point 'angular-tree-component' contains deep imports into 'lodash/defaultsDeep', 'lodash/get', 'lodash/omit', 'lodash/isNumber', 'lodash/first', 'lodash/last', 'lodash/some', 'lodash/every', 'lodash/compact', 'lodash/find', 'lodash/isString', 'lodash/isFunction', 'lodash/throttle', 'lodash/includes', 'lodash/pick'. This is probably not a problem, but may cause the compilation of entry points to be out of order.

有什么想法吗?

推荐答案

问题是,应用程序中的某个地方您正在使用@Input装饰器以及查询装饰器之一(@ContentChild@ContentChildren@ViewChild@ViewChildren@Query).装饰器的这种组合实际上没有任何意义,并且可能会阻止编译器正确分析您的代码,因此会出现错误Cannot combine @Input decorators with query decorators.

The problem is that somewhere in your application you're using the @Input decorator together with one of the query decorators (@ContentChild, @ContentChildren, @ViewChild, @ViewChildren, @Query). This combination of decorators actually makes no sense and may prevent the compiler from correctly analyzing your code, therefore you get the error Cannot combine @Input decorators with query decorators.

浏览代码,并从应用了查询修饰符的成员中删除每个@Input修饰符.另外,您可能会检查所有第三方库是否都与angular 8.0.0兼容.

Look through your code and remove every @Input decorator from members which have a query decorator applied. Also, you might check if all of your 3rd party libraries are compatible with angular 8.0.0.

这篇关于无法使用Ivy将@Input装饰器与查询装饰器组合的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆