![](/img/trans.png)
[英]Schema validation failed with the following errors: Data path "" must NOT have additional properties(inlineStyleLanguage)
[英]Angular 13 migration : Schema validation failed with the following errors: Data path "/error" must be string
我正在從 angular 8 遷移到 13。我遵循https://update.angular.io/嘗試構建我的大多數自定義庫時收到此應用程序根文件夾的指導方針:
✖ Compiling with Angular sources in Ivy partial compilation mode.
Schema validation failed with the following errors:
Data path "/error" must be string.
有些圖書館正在工作,但有些圖書館沒有,我不知道為什么。
你知道這種消息是什么意思嗎?
有沒有辦法獲得比這條消息更多的日志?
這很可能是由您在彼此之間導入自定義庫的方式引起的。
例如。
如果你有 my-lib-a、my-lib-b 和 my-lib-c。 並且這些庫中的任何一個從另一個庫導入組件或模式,導入必須是絕對導入而不是相對導入。
即如果你想將一個組件從 my-lib-a 導入到 my-lib-b
那么導入必須是lib/my-lib-a/<imported component name>
而不是../../my-lib-a/<imported component name>
我建議你使用 import alias 來使這更容易處理,這樣你就有了類似的東西
import Component from '@my-lib-a/componentName'
您可以在 tsconfig.json 文件中進行配置。
我希望這有幫助
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.