sibiraj-s / ngx-editor

🖋️ Rich Text Editor for angular using ProseMirror
https://sibiraj-s.github.io/ngx-editor/
MIT License
424 stars 183 forks source link

[Bug]: ngx-editor Property 'pmViewDesc' must be of type 'ViewDesc', but here has type 'ViewDesc' #436

Closed hocine15 closed 1 year ago

hocine15 commented 1 year ago

What happened?

There is a build issue under angular 13 and ngx-editor 13.0.0

Version

13.0.0

Angular Version

13.3.11

What browsers are you seeing the problem on?

Firefox, Chrome, Safari

Link to reproduce

No response

Relevant log output

Error: node_modules/prosemirror-view/dist/index.d.ts:207:9 - error TS2717: Subsequent property declarations must have the same type.  Property 'pmViewDesc' must be of type 'ViewDesc', but here has type 'ViewDesc'.

207         pmViewDesc?: ViewDesc;
            ~~~~~~~~~~

  node_modules/prosemirror-state/node_modules/prosemirror-view/dist/index.d.ts:215:9
    215         pmViewDesc?: ViewDesc;
                ~~~~~~~~~~
    'pmViewDesc' was also declared here.

Willing to submit a PR?

No response

hocine15 commented 1 year ago

Any one has a solution for this issue ?

We cannot use or build with this library anymore.

sibiraj-s commented 1 year ago

let me check what could be done, This is either a bug in prosemirror, a possible issue with a conflict in typescript version.

sibiraj-s commented 1 year ago

Can you try v15.0.1. Not sure which combination of dependency caused this. Updated the dependencies to latest not seeing this issue.

hocine15 commented 1 year ago

Hi,

Thank you for your quick answer,

Currently my project is under angular 13, so I tested the version 15.0.1 under angular 13 and it's not working.

so will check that version when upgrading my project to angular 14.

I don't know if it's possible to provide a 13.0.1 for angular 13 in order to fix that ? for angular 13 projetcs.

Thanks

hocine15 commented 1 year ago

Version 15.0.1 works under angular 14 (typescript 4.8.4) , thanks.

sibiraj-s commented 1 year ago

Glad that worked. Closing this issue as fixed.

I don't know if it's possible to provide a 13.0.1 for angular 13 in order to fix that ? for angular 13 projetcs.

Not sure what caused this issue. And really sorry, I don't have bandwidth to fix this right now. This is either an issue with typescript or prosemirror. You can try updating/downgrading the typescript version to check if it fixes your issue.

github-actions[bot] commented 1 year ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in the thread.