dashboard
dashboard copied to clipboard
Enable type checking of declaration files
We recently enabled skipLibCheck option in tsconfig since we were unable to build the application without it. This is not ideal and we need to investigate, fix the underlying issues and revert this change here.
From logs:
Error: ../../node_modules/@types/react/index.d.ts:3318:13 - error TS2717: Subsequent property declarations must have the same type. Property 'view' must be of type 'SVGProps<SVGViewElement>', but here has type 'SVGProps<SVGViewElement>'.
3318 view: React.SVGProps<SVGViewElement>;
~~~~
node_modules/@types/react/index.d.ts:3438:13
3438 view: React.SVGProps<SVGViewElement>;
~~~~
'view' was also declared here.
Error: node_modules/@types/react/index.d.ts:3240:19 - error TS2320: Interface 'ElementClass' cannot simultaneously extend types 'Component<any, {}, any>' and 'Component<any, {}, any>'.
Named property 'refs' of types 'Component<any, {}, any>' and 'Component<any, {}, any>' are not identical.
3240 interface ElementClass extends React.Component<any> {
~~~~~~~~~~~~
Error: node_modules/@types/react/index.d.ts:3248:14 - error TS2300: Duplicate identifier 'LibraryManagedAttributes'.
3248 type LibraryManagedAttributes<C, P> = C extends React.MemoExoticComponent<infer T> | React.LazyExoticComponent<infer T>
~~~~~~~~~~~~~~~~~~~~~~~~
../../node_modules/@types/react/index.d.ts:3130:14
3130 type LibraryManagedAttributes<C, P> = C extends React.MemoExoticComponent<infer T> | React.LazyExoticComponent<infer T>
~~~~~~~~~~~~~~~~~~~~~~~~
'LibraryManagedAttributes' was also declared here.
Environment
npm: 9.5.0 node: v18.14.2
I disabled skipLibCheck locally and tried to reproduce this issue but I couldn't.
Tested it on Node versions v18.12.1 (npm: 8.19.2), v18.14.2 (npm: 9.5.0) and v18.17.0 (npm: 9.6.7).
Ran following sequence of commands:
rm -R node_modules
npm ci
npm run start // build script also worked fine
I also tried to clear the npm cache, however, v18.14.2 and v18.17.0 were fresh installations so they couldn't have any cache problem.
One extra step I took was to remove .angular/cache directory. So can you please also try that?
Is there anything that I missed or should know to reproduce this?
I did try removing node_modules and .angular directory as well but the issue is persistent for me. Still trying to figure out how exactly to reproduce this on another machine though. We faced this at a customer's end as well yesterday.
Just for the sake of clarification/documentation:
dashboard/modules/web v1.20.7 main [±?⇡]
✗ node --version
v18.14.2
dashboard/modules/web v1.20.7 main [±?⇡]
▶ npm --version
9.5.0
dashboard/modules/web v1.20.7 main [±?⇡]
▶ rm -rf node_modules && rm -rf .angular && npm ci && npm run start
> [email protected] postinstall
> npm run vi
> [email protected] vi
> node version.js
{
"dirty": true,
"raw": "v2.23.0-34-gf217234bf-dirty",
"hash": "gf217234bf",
"distance": 34,
"tag": "v2.23.0",
"semver": {
"options": {
"loose": false,
"includePrerelease": false
},
"loose": false,
"raw": "v2.23.0",
"major": 2,
"minor": 23,
"patch": 0,
"prerelease": [],
"build": [],
"version": "2.23.0"
},
"suffix": "34-gf217234bf-dirty",
"semverString": "2.23.0+34.gf217234bf",
"edition": "Enterprise Edition",
"humanReadable": "v2.23.0-dev-gf217234bf",
"date": "Thu Aug 03 2023"
}
> [email protected] prepare
> cd ../../ && husky install modules/web/.husky
husky - Git hooks installed
added 2067 packages, and audited 2068 packages in 43s
308 packages are looking for funding
run `npm fund` for details
5 moderate severity vulnerabilities
To address all issues (including breaking changes), run:
npm audit fix --force
Run `npm audit` for details.
> [email protected] start
> npm run vi && ng s -c=default-"${KUBERMATIC_EDITION:=ee}" --host "${KUBERMATIC_HOST:=localhost}"
> [email protected] vi
> node version.js
{
"dirty": true,
"raw": "v2.23.0-34-gf217234bf-dirty",
"hash": "gf217234bf",
"distance": 34,
"tag": "v2.23.0",
"semver": {
"options": {
"loose": false,
"includePrerelease": false
},
"loose": false,
"raw": "v2.23.0",
"major": 2,
"minor": 23,
"patch": 0,
"prerelease": [],
"build": [],
"version": "2.23.0"
},
"suffix": "34-gf217234bf-dirty",
"semverString": "2.23.0+34.gf217234bf",
"edition": "Enterprise Edition",
"humanReadable": "v2.23.0-dev-gf217234bf",
"date": "Thu Aug 03 2023"
}
Workspace extension with invalid name (defaultProject) found.
...
...
Error: node_modules/@types/react/index.d.ts:3240:19 - error TS2320: Interface 'ElementClass' cannot simultaneously extend types 'Component<any, {}, any>' and 'Component<any, {}, any>'.
Named property 'refs' of types 'Component<any, {}, any>' and 'Component<any, {}, any>' are not identical.
3240 interface ElementClass extends React.Component<any> {
~~~~~~~~~~~~
Error: node_modules/@types/react/index.d.ts:3248:14 - error TS2300: Duplicate identifier 'LibraryManagedAttributes'.
3248 type LibraryManagedAttributes<C, P> = C extends React.MemoExoticComponent<infer T> | React.LazyExoticComponent<infer T>
~~~~~~~~~~~~~~~~~~~~~~~~
../../node_modules/@types/react/index.d.ts:3130:14
3130 type LibraryManagedAttributes<C, P> = C extends React.MemoExoticComponent<infer T> | React.LazyExoticComponent<infer T>
~~~~~~~~~~~~~~~~~~~~~~~~
'LibraryManagedAttributes' was also declared here.
** Angular Live Development Server is listening on localhost:8000, open your browser on http://localhost:8000/ **
Issues go stale after 90d of inactivity.
After a furter 30 days, they will turn rotten.
Mark the issue as fresh with /remove-lifecycle stale.
If this issue is safe to close now please do so with /close.
/lifecycle stale
Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.
If this issue is safe to close now please do so with /close.
/lifecycle rotten
Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.
/close
@kubermatic-bot: Closing this issue.
In response to this:
Rotten issues close after 30d of inactivity. Reopen the issue with
/reopen. Mark the issue as fresh with/remove-lifecycle rotten./close
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.