aws-cdk 1.134.0 / jsdom reference issue
See original GitHub issueAt some point today, when running a number of builds in a construct library that I am building, I started receiving a number of issues referring to jsdom / type errors (see the list below + 200 or so). I added an option to the tsconfig>compilerOptions>lib to add ‘DOM’ along wiht the default ‘es2018’ which resolved the issue for the jest/eslint, but the main compile is not updates in the tsconfig.json file and is still failing. I have tried to rebuild / clear the project from source and still getting the errors.
node_modules/@types/jsdom/base.d.ts:24:40 - error TS2304: Cannot find name 'DocumentFragment'. 24 static fragment(html: string): DocumentFragment; ~~~~~~~~~~~~~~~~ node_modules/@types/jsdom/base.d.ts:41:28 - error TS2304: Cannot find name 'Node'. 41 nodeLocation(node: Node): ElementLocation | null; ~~~~ node_modules/@types/jsdom/base.d.ts:172:19 - error TS2304: Cannot find name 'HTMLScriptElement'. 172 element?: HTMLScriptElement | HTMLLinkElement | HTMLIFrameElement | HTMLImageElement | undefined; ~~~~~~~~~~~~~~~~~ node_modules/@types/jsdom/base.d.ts:172:39 - error TS2304: Cannot find name 'HTMLLinkElement'. 172 element?: HTMLScriptElement | HTMLLinkElement | HTMLIFrameElement | HTMLImageElement | undefined;
Do you know what could be causing this reference issue to the jsdom library or a way to update the tsconfig to include the ‘DOM’ library?
Thanks Nick
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:7 (3 by maintainers)
Hi, our yarn build last week all worked fine but they are all failing now with the same issue faced by nickehunt. I was actually advocating projen to my team and these errors are bit uncomfortable to see during the demos. Please suggest a fix.
At the moment, we don’t have a full fix, but only a workaround: https://github.com/projen/projen/issues/1264#issuecomment-982365744