[英]Vscode displaying "my-custom-element" is not a known element after upgrade from Angular v7 to v8
I have an Angular project that uses many custom elements from another project that we share via an npm package (as it is used in many other projects)我有一个 Angular 项目,它使用了我们通过 npm package 共享的另一个项目中的许多自定义元素(因为它在许多其他项目中使用)
After upgrading Angular from 7 to 8 (on the way to latest), vscode now show red lines for ALL the components..在将 Angular 从 7 升级到 8 之后(正在升级到最新版本),vscode 现在显示所有组件的红线。
With the error " is not a known element"出现错误“不是已知元素”
The project builds and runs fine.该项目构建并运行良好。 The elements are all export from the shared module, and the shared module is imported.元素都是从共享模块导出的,共享模块是导入的。 No restarting of vs code, running npm i etc will fix this.无需重启 vs 代码,运行 npm i 等将解决此问题。
I do not get these errors before the upgrade to Angular v8.在升级到 Angular v8 之前,我没有收到这些错误。
Any ideas why vscode would be showing this?任何想法为什么 vscode 会显示这个? (for every custom element in every html file) (对于每个 html 文件中的每个自定义元素)
Thanks in advance提前致谢
Your Angular Language service Extention might not be configured correctly with migrations.您的 Angular 语言服务扩展可能未通过迁移正确配置。 Therefore try to restart it.因此尝试重新启动它。
If it is not working you can uninstall and install that extension again.如果它不起作用,您可以卸载并再次安装该扩展程序。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.