Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build error with angular 12. #1015

Closed
whitestarlau opened this issue May 25, 2021 · 2 comments
Closed

Build error with angular 12. #1015

whitestarlau opened this issue May 25, 2021 · 2 comments

Comments

@whitestarlau
Copy link

描述问题

Can not build project with angular 12 project.
ng build get error like this:

Error: node_modules/vditor/dist/index.d.ts:1:23 - error TS2688: Cannot find type definition file for './types'.

1 /// <reference types="./types" />
                        ~~~~~~~


Error: node_modules/vditor/dist/index.d.ts:6:13 - error TS2304: Cannot find name 'IVditor'.

6     vditor: IVditor;
              ~~~~~~~


Error: node_modules/vditor/dist/index.d.ts:11:53 - error TS2304: Cannot find name 'IOptions'.

11     constructor(id: string | HTMLElement, options?: IOptions);
                                                       ~~~~~~~~


Error: node_modules/vditor/dist/index.d.ts:64:22 - error TS2304: Cannot find name 'ICommentsData'.

64     getCommentIds(): ICommentsData[];
                        ~~~~~~~~~~~~~


Error: node_modules/vditor/dist/method.d.ts:1:23 - error TS2688: Cannot find type definition file for './types'.

1 /// <reference types="./types" />
                        ~~~~~~~


Error: node_modules/vditor/dist/method.d.ts:10:43 - error TS2304: Cannot find name 'IHljs'.

10     static highlightRender: (hljsOption?: IHljs, element?: HTMLElement | Document, cdn?: string) => void;
                                             ~~~~~


Error: node_modules/vditor/dist/method.d.ts:14:16 - error TS2304: Cannot find name 'IMath'.

14         math?: IMath;
                  ~~~~~


Error: node_modules/vditor/dist/method.d.tsm:29:90 - error TS2304: Cannot find name 'IVditor'.

29     static outlineRender: (contentElement: HTMLElement, targetElement: Element, vditor?: IVditor) => string;
                                                                                            ~~~~~~~


Error: node_modules/vditor/dist/method.d.ts:37:48 - error TS2304: Cannot find name 'IPreviewOptions'.

37     static md2html: (mdText: string, options?: IPreviewOptions) => Promise<string>;
                                                  ~~~~~~~~~~~~~~~


Error: node_modules/vditor/dist/method.d.ts:39:82 - error TS2304: Cannot find name 'IPreviewOptions'.

39     static preview: (previewElement: HTMLDivElement, markdown: string, options?: IPreviewOptions) => Promise<void>;
                                                                                    ~~~~~~~~~~~~~~~

版本信息

  • 版本:angular 12
  • 操作系统:Ubuntu 18.04

其他信息

@glf726
Copy link

glf726 commented May 29, 2021

没有把types文件夹打到dist里面,看了下webpack CopyPlugin 少了{from: 'types', to: 'types'},

doowzs added a commit to doowzs/DotOJ that referenced this issue Jun 4, 2021
@Vanessa219
Copy link
Owner

Vanessa219 commented Jun 25, 2021

#1034

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants