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

Cannot find type definition file for 'ckeditor'. & Cannot find namespace 'CKEDITOR'. #311

Closed
akram1905 opened this issue Feb 8, 2021 · 6 comments

Comments

@akram1905
Copy link

I started getting those errors after updating from 1.3.1 to 1.3.2
Of course everything was working in 1.3.1

Error: node_modules/ng2-ckeditor/ckeditor.component.d.ts:1:23 - error TS2688: Cannot find type definition file for 'ckeditor'.

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


Error: node_modules/ng2-ckeditor/ckeditor.component.d.ts:13:13 - error TS2503: Cannot find namespace 'CKEDITOR'.

13     config: CKEDITOR.config;
               ~~~~~~~~


Error: node_modules/ng2-ckeditor/ckeditor.component.d.ts:16:26 - error TS2503: Cannot find namespace 'CKEDITOR'.

16     change: EventEmitter<CKEDITOR.eventInfo>;
                            ~~~~~~~~


Error: node_modules/ng2-ckeditor/ckeditor.component.d.ts:17:32 - error TS2503: Cannot find namespace 'CKEDITOR'.

17     editorChange: EventEmitter<CKEDITOR.eventInfo>;
                                  ~~~~~~~~


Error: node_modules/ng2-ckeditor/ckeditor.component.d.ts:18:25 - error TS2503: Cannot find namespace 'CKEDITOR'.

18     ready: EventEmitter<CKEDITOR.eventInfo>;
                           ~~~~~~~~


Error: node_modules/ng2-ckeditor/ckeditor.component.d.ts:19:24 - error TS2503: Cannot find namespace 'CKEDITOR'.

19     blur: EventEmitter<CKEDITOR.eventInfo>;
                          ~~~~~~~~


Error: node_modules/ng2-ckeditor/ckeditor.component.d.ts:20:25 - error TS2503: Cannot find namespace 'CKEDITOR'.

20     focus: EventEmitter<CKEDITOR.eventInfo>;
                           ~~~~~~~~
@kzimny
Copy link
Collaborator

kzimny commented Feb 8, 2021

The error occures because ng2-ckeditor component reference @types/ckeditor package which need to be installed in your own project. Unfortunatelly the peerDependencies where not updated in release 1.3.2. Add the @types/ckeditor to your dependencies and your project will compile without errors. From now you can use intellisense for ckeditor in your own project components and reference ckeditor not as any but as CKEditorComponent. Have fun!
image

gkalpak added a commit to angular/ngcc-validation that referenced this issue Feb 9, 2021
Since v1.3.2, `ng2-ckeditor` depends on the `@types/ckeditor` package
being installed. By accident, this was not reflected in the v1.3.2
releases `peerDependencies` (see yabab-dev/ng2-ckeditor#311).

This commit avoids build failures (such as [this one][1]) by adding
`@types/ckeditor` as a dev dependency.

[1]: https://circleci.com/gh/angular/ngcc-validation/24561
gkalpak added a commit to angular/ngcc-validation that referenced this issue Feb 9, 2021
Since v1.3.2, `ng2-ckeditor` depends on the `@types/ckeditor` package
being installed. By accident, this was not reflected in the v1.3.2
releases `peerDependencies` (see yabab-dev/ng2-ckeditor#311).

This commit avoids build failures (such as [this one][1]) by adding
`@types/ckeditor` as a dev dependency.

[1]: https://circleci.com/gh/angular/ngcc-validation/24561
@kzimny kzimny pinned this issue Feb 15, 2021
@kzimny kzimny closed this as completed Feb 15, 2021
@Kritika7
Copy link

Kritika7 commented May 3, 2021

where to add this code?

@kzimny
Copy link
Collaborator

kzimny commented May 3, 2021

Please see the installation instruction: https://github.com/chymz/ng2-ckeditor#installation

@Kritika7
Copy link

Kritika7 commented May 4, 2021

Hey kzimny, thanks for the above link. I need one more help,
do you have any idea regarding functionmatcher error
Error: node_modules/@types/jasmine/index.d.ts:668:15 - error TS2430: Interface 'FunctionMatchers' incorrectly extends interface 'Matchers'.
The types returned by 'toHaveBeenCalledWith(...)' are incompatible between these types.
Type 'boolean' is not assignable to type 'Promise'.

668 interface FunctionMatchers extends Matchers {

@kzimny
Copy link
Collaborator

kzimny commented May 4, 2021

This issue seems to solved your problem already angular/protractor#4521

@Kritika7
Copy link

Kritika7 commented May 4, 2021

This issue seems to solved your problem already angular/protractor#4521

it came again

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