首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用选项卡角:请确保它在您的tsconfig中通过‘file’或'include‘属性

使用选项卡角:请确保它在您的tsconfig中通过‘file’或'include‘属性
EN

Stack Overflow用户
提问于 2019-06-28 22:55:34
回答 1查看 363关注 0票数 0

我正在尝试使用角Tabler

代码语言:javascript
复制
@tabler/angular-core
@tabler/angular-ui
@tabler/angular-styles
@tabler/angular-forms

在npm安装了所有这些包并运行ng serve之后,我得到了错误:

代码语言:javascript
复制
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上我遇到了以下问题:

代码语言:javascript
复制
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)

我怎么才能解决这个问题?

EN

回答 1

Stack Overflow用户

发布于 2019-06-28 23:43:14

这只是一个疯狂的猜测,但您可能会试图获得角8来编译一个角6-7包。@tabler/转角最近一次更新是在4月26日,之后是在5月29日最后一次发布。

从角8开始,ViewContainerRef接口的定义发生了变化,现在static: boolean属性是所述接口所必需的。

试着把你的角度版本降到7,它应该能解决问题。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/56813889

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档