我正在尝试使用角Tabler
@tabler/angular-core
@tabler/angular-ui
@tabler/angular-styles
@tabler/angular-forms在npm安装了所有这些包并运行ng serve之后,我得到了错误:
Argument of type '{ read: typeof ViewContainerRef; }' is not assignable to parameter of type '{ read?: any; static: boolean; }'.
Property 'static' is missing in type '{ read: typeof ViewContainerRef; }' but required in type '{ read?: any; static: boolean; }'.ts(2345)这是通过在horizontal.component.ts中更改对象来修正的。
@ViewChild('fieldComponent',{ read: ViewContainerRef,静态: false })
然而,现在在ng serve上我遇到了以下问题:
ERROR in ./node_modules/@tabler/angular-core/index.ts
Module build failed (from ./node_modules/@ngtools/webpack/src/index.js):
Error: /Users/me/git//ngapp/node_modules/@tabler/angular-core/index.ts is missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property.
The missing file seems to be part of a third party library. TS files in published libraries are often a sign of a badly packaged library. Please open an issue in the library repository to alert its author and ask them to package the library using the Angular Package Format.
at AngularCompilerPlugin.getCompiledFile (/Users/me/git/ngapp/node_modules/@ngtools/webpack/src/angular_compiler_plugin.js:838:23)
at /Users/me/git//ngapp/node_modules/@ngtools/webpack/src/loader.js:41:31
at processTicksAndRejections (internal/process/task_queues.js:89:5)我怎么才能解决这个问题?
发布于 2019-06-28 23:43:14
这只是一个疯狂的猜测,但您可能会试图获得角8来编译一个角6-7包。@tabler/转角最近一次更新是在4月26日,之后是在5月29日最后一次发布。
从角8开始,ViewContainerRef接口的定义发生了变化,现在static: boolean属性是所述接口所必需的。
试着把你的角度版本降到7,它应该能解决问题。
https://stackoverflow.com/questions/56813889
复制相似问题