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 TS2307: Cannot find module #14205

Closed
rlucky469 opened this issue May 22, 2023 · 8 comments · Fixed by #14208
Closed

error TS2307: Cannot find module #14205

rlucky469 opened this issue May 22, 2023 · 8 comments · Fixed by #14208
Labels
domain:ts package:ui squad:core Issue to be handled by the Core team. squad:features Issue to be handled by the Features team. type:bug This issue reports a buggy (incorrect) behavior.

Comments

@rlucky469
Copy link

📝 Provide a description of requested docs changes

image

image

@rlucky469 rlucky469 added the type:docs This issue reports a task related to documentation (e.g. an idea for a guide). label May 22, 2023
@Reinmar
Copy link
Member

Reinmar commented May 22, 2023

@oleq is debugging this – it seems that there's an import that works locally and on our CIs but not when used in a certain situations ;/.

@oleq
Copy link
Member

oleq commented May 22, 2023

I confirm this issue in a fresh Angular project. Also, this is what I found out so far:

In document-outline/src/index.d.ts we have

export declare const icons: {
    tableOfContentsIcon: string;
};

as a result of the following index.ts

import tableOfContentsIcon from '../theme/icons/table-of-contents.svg';

export const icons = {
	tableOfContentsIcon
};

and this is fine.


In ui/src/index.d.ts there is

export { default as ColorPaletteIcon } from '../theme/icons/color-palette.svg';

as a result of the following index.ts

export { default as ColorPaletteIcon } from '../theme/icons/color-palette.svg';

and that causes errors

@Reinmar Reinmar added the type:bug This issue reports a buggy (incorrect) behavior. label May 22, 2023
@Witoso
Copy link
Member

Witoso commented May 22, 2023

I've just found out that "skipLibCheck": true hides it for the tsc and the error is not produced if you're consuming the package. Not sure why our CI didn't catch the issue though.

@CKEditorBot CKEditorBot added the status:in-progress Set automatically when an issue lands in the "In progress" column. We are working on it. label May 22, 2023
@rlucky469
Copy link
Author

it worked thank you @Witoso

@CKEditorBot CKEditorBot removed the status:in-progress Set automatically when an issue lands in the "In progress" column. We are working on it. label May 22, 2023
@Witoso Witoso reopened this May 22, 2023
@Witoso
Copy link
Member

Witoso commented May 22, 2023

While "skipLibCheck": true may be a workaround, having this configuration option set is not a good practice. We will keep this open to implement a proper fix.

@Witoso Witoso added domain:ts and removed type:docs This issue reports a task related to documentation (e.g. an idea for a guide). labels May 22, 2023
mlewand added a commit that referenced this issue May 22, 2023
Fix (ui): Fixed way how code exports the `colorPaletteIcon` icon, which could result with a broken build. Closes #14205.
@mlewand mlewand added squad:core Issue to be handled by the Core team. squad:features Issue to be handled by the Features team. package:ui labels May 22, 2023
@mlewand
Copy link
Contributor

mlewand commented May 22, 2023

The fix has been merged. We plan to release a hotfix release tomorrow.

For those of you facing this issue, you can try a workaround posted by @Witoso.

@mlewand mlewand pinned this issue May 22, 2023
@CKEditorBot CKEditorBot added this to the iteration 64 milestone May 22, 2023
pomek pushed a commit that referenced this issue May 23, 2023
Fix (ui): Fixed way how code exports the `colorPaletteIcon` icon, which could result with a broken build. Closes #14205.
@Reinmar
Copy link
Member

Reinmar commented May 23, 2023

There was one more commit needed to fix this issue: 5f2cbea

@mlewand
Copy link
Contributor

mlewand commented May 23, 2023

This problem has been fixed with 38.0.1 hotfix. I'm unpinning this issue.

@mlewand mlewand unpinned this issue May 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:ts package:ui squad:core Issue to be handled by the Core team. squad:features Issue to be handled by the Features team. type:bug This issue reports a buggy (incorrect) behavior.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants