将库从 Angular 9 更新到 Angular 10 会产生错误 Symbol MatButton declared in ....is not exported from @angular/material/button
Updating library from Angular 9 to Angular 10 produces error Symbol MatButton declared in ....is not exported from @angular/material/button
将 Angular 库从 angular 9 更新到 angular 10 后,我在构建库时遇到以下错误。
ERROR: Symbol MatButton declared in ........................... is not exported from @angular/material/button.
我不明白原因,有人可以建议需要做什么吗?
谢谢,
米纳克希
我在另一个模块上遇到了同样的问题。我的问题是我通过深路径而不是短路径导入了模块。
发生错误:
import { SomeModule } from 'npm-package-name/some.module';
没有错误:
import { SomeModule } from 'npm-package-name';
在导入正确的情况下启用 ivy 后,我遇到了同样的问题。对我来说,将 @angular/material
更新为 11.2.10
并将 @angular/compiler-cli
更新为 11.2.11
解决了这个问题。
将 Angular 库从 angular 9 更新到 angular 10 后,我在构建库时遇到以下错误。
ERROR: Symbol MatButton declared in ........................... is not exported from @angular/material/button.
我不明白原因,有人可以建议需要做什么吗?
谢谢, 米纳克希
我在另一个模块上遇到了同样的问题。我的问题是我通过深路径而不是短路径导入了模块。
发生错误:
import { SomeModule } from 'npm-package-name/some.module';
没有错误:
import { SomeModule } from 'npm-package-name';
在导入正确的情况下启用 ivy 后,我遇到了同样的问题。对我来说,将 @angular/material
更新为 11.2.10
并将 @angular/compiler-cli
更新为 11.2.11
解决了这个问题。