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

Error building with Angular 12 #6696

Closed
maratkalibek opened this issue May 13, 2021 · 7 comments · Fixed by #6843
Closed

Error building with Angular 12 #6696

maratkalibek opened this issue May 13, 2021 · 7 comments · Fixed by #6843
Assignees

Comments

@maratkalibek
Copy link

Reproduction link

https://github.com/NG-ZORRO/ng-zorro-antd

Steps to reproduce

  1. create new project
  2. add ng-zorro-antd
  3. build project

What is expected?

Successful compilation

What is actually happening?

Broken build

Environment Info
ng-zorro-antd 11.4.1
Browser Chrome

Following error occurs

Error: node_modules/resize-observer-polyfill/src/index.d.ts:19:18 - error TS2717: Subsequent property declarations must have the same type.  Property 'contentRect' must be of type 'DOMRectReadOnly', but here has type 'DOMRectReadOnly'.

19         readonly contentRect: DOMRectReadOnly;
                    ~~~~~~~~~~~

  node_modules/typescript/lib/lib.dom.d.ts:12696:14
    12696     readonly contentRect: DOMRectReadOnly;
                       ~~~~~~~~~~~
    'contentRect' was also declared here.
```<!-- generated by ng-zorro-issue-helper. DO NOT REMOVE -->
@joshcomley
Copy link

Having the same issue - I believe it's related to the updated TypeScript when you upgrade Angular - but it is ng-zorro that is dependant upon the broken resize-observer-polyfill nonetheless

@vthinkxie
Copy link
Member

vthinkxie commented May 13, 2021

Can have a try to add "skipLibCheck" in tsconfig.json ?

https://www.typescriptlang.org/tsconfig#skipLibCheck

@joshcomley
Copy link

@vthinkxie this works, thank you - but of course isn't a long term solution

@CarlosAmaral
Copy link

Would be nice if you guys could switch to another resize-observer-polyfill that's maintained.

@ah-kevin
Copy link

mark

@maratkalibek maratkalibek mentioned this issue Jun 4, 2021
15 tasks
@hsuanxyz hsuanxyz self-assigned this Jul 12, 2021
hsuanxyz added a commit to hsuanxyz/ng-zorro-antd that referenced this issue Jul 12, 2021
hsuanxyz added a commit to hsuanxyz/ng-zorro-antd that referenced this issue Jul 12, 2021
@jveko
Copy link

jveko commented Jul 21, 2021

Can have a try to add "skipLibCheck" in tsconfig.json ?

https://www.typescriptlang.org/tsconfig#skipLibCheck

works for me too

@krokofant
Copy link
Contributor

@jveko Yeah, but it shouldn't be needed anymore with v12. 🙄

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

Successfully merging a pull request may close this issue.

8 participants