我在
version 10
上有我的角度应用程序。我将其更新为 version 16
,现在当我构建本地(角度)库时,它无法给出此错误。
"✖ Compiling with Angular sources in Ivy full compilation mode."
我的角度库的
package.json
如下。
{
"name": "@my-lib",
"version": "1.0.0",
"peerDependencies": {
"@angular/common": "^10.0.0",
"@angular/core": "^10.0.0",
"xlsx": "^0.16.8"
},
"dependencies": {
"tslib": "^2.0.0"
}
}
是否需要在 Angular 16 中添加(或删除)一些内容来构建库?我是中级到 Angular 非常感谢任何帮助。
我实际上解决了这个问题。我删除了节点模块、package-lock.json 和清理 npm 缓存,删除了我的库的构建,将对等依赖项转移到与我的主项目版本相同的版本。然后我再次安装了节点包。再次构建我的库,这对我有用。