vmware-clarity / core

Clarity is a scalable, accessible, customizable, open-source design system built with web components. Works with any JavaScript framework, created for enterprises, and designed to be inclusive.
https://clarity.design
MIT License
164 stars 42 forks source link

Angular app won't compile with Clarity #231

Closed beaker1977 closed 1 year ago

beaker1977 commented 1 year ago

This is a bug report for the @clr Angular or UI versions of the design system. For the web-component implementation of Clarity (@cds), visit vmware-clarity/core.

Describe the bug

When attempting to run my new Angular app (npm start) I get the following errors after add the Clarity components to my project as instructed on the 'Get Started' page:

Error: node_modules/@cds/core/internal/utils/exists.d.ts:1:39 - error TS2307: Cannot find module 'ts-toolbelt/out/Function/Curry' or its corresponding type declarations.

1 export declare const existsIn: import("ts-toolbelt/out/Function/Curry").Curry<(a_0: string[], a_1: object) => boolean>;


Error: node_modules/@cds/core/internal/utils/exists.d.ts:3:45 - error TS2307: Cannot find module 'ts-toolbelt/out/Function/Curry' or its corresponding type declarations.

3 export declare const existsInWindow: import("ts-toolbelt/out/Function/Curry").Curry<(p_0: string[], p_1: object) => boolean>;

Error: node_modules/@cds/core/internal/utils/math.d.ts:2:45 - error TS2307: Cannot find module 'ts-toolbelt/out/Function/Curry' or its corresponding type declarations.

2 export declare const sumAndSubtract: import("ts-toolbelt/out/Function/Curry").Curry<(a_0: any, a_1: number[], a_2: number[]) => number>;


Error: node_modules/@cds/core/internal/utils/math.d.ts:3:43 - error TS2307: Cannot find module 'ts-toolbelt/out/Function/Curry' or its corresponding type declarations.

3 export declare const compareSumTo: import("ts-toolbelt/out/Function/Curry").Curry<(a_0: number, a_1: number[], a_2: number[], a_3: (x: number) => boolean) => boolean>;

IF I remove the clarity import reference in the app.module.ts file the app compiles and the sample home page launches

How to reproduce

Unable to create a template that's reproducible. I've included my src folder code here instead.

Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior

npm start should launch the angular app with no errors

Versions

Clarity version:

Framework version: _ie: Angular 15_2

Device:

Additional notes

Using Visual Code 1.77 src.zip

SaschaSchwarz commented 1 year ago

I am facing the same issue.

This probably is related to @cds/core@6.4.1. As 6.4.0 does work.

This corresponds to

curl --silent https://registry.npmjs.org/@cds/core/-/core-6.4.0.tgz | tar xzf - package/internal/utils/exists.d.ts -O | grep ts-toolbelt

not producing any output.

Whereas

curl --silent https://registry.npmjs.org/@cds/core/-/core-6.4.1.tgz | tar xzf - package/internal/utils/exists.d.ts -O | grep ts-toolbelt

does.

kevinbuhmann commented 1 year ago

I think I broke something in 7793a2697a76fe2d9bece7626ce4cae4b0256fcf. I am working on a fix.

github-actions[bot] commented 1 year ago

:tada: This issue has been resolved in version 6.4.2 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

github-actions[bot] commented 1 year ago

Hi there 👋, this is an automated message. To help Clarity keep track of discussions, we automatically lock closed issues after 14 days. Please look for another open issue or open a new issue with updated details and reference this one as necessary.