2.9.1
mac
2.6.10
用ts的时候 报错element-ui下types 文件中element-ui.d.ts文件里PluginObject没有引入 打包不成功
PluginObject在 element-ui.d.ts文件 头部引入
PluginObject在 element-ui.d.ts文件 头部未引入
Translation of this issue:
2.9.1
Mac
2.6.10
It is unsuccessful to report that PluginObject was not introduced into the element-ui.d.ts file under element-ui when using ts.
PluginObject is introduced into element-ui.d.ts file header
PluginObject was not introduced in element-ui.d.ts file header
same for me, my builds are failed now. For workaround I use in tsconfig.json "skipLibCheck": true
but it should be fixed.
error in /Users/user/dev/myproject/node_modules/element-ui/types/element-ui.d.ts
ERROR in /Users/user/dev/myproject/node_modules/element-ui/types/element-ui.d.ts
331:30 Cannot find name 'PluginObject'.
329 |
330 | /** InfiniteScroll Directive */
> 331 | export const InfiniteScroll: PluginObject<ElInfiniteScroll>;
| ^
332 |
333 | /** PageHeader Component */
334 | export class PageHeader extends ElPageHeader {}
It's careless since this bug has been existing for more than half a month.
I worked-around by editing node_modules/element-ui/types/element-ui.d.ts and changing line 1 from
import Vue from 'vue'
to
import Vue, { PluginObject } from 'vue'
我也遇到了这个问题,没有引入 PluginObject,导致打包失败
Problem seems to have been already fixed in version 2.9.2.
问题已经在 2.9.2 版本中修复
Confirm this is fixed in 2.9.2, thanks!
Most helpful comment
same for me, my builds are failed now. For workaround I use in tsconfig.json
"skipLibCheck": true
but it should be fixed.