-
Notifications
You must be signed in to change notification settings - Fork 105
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
[Typescript] DOM libs are undefined (v3.1.2) #104
Comments
We're having the exact same problem. Would be great if this could be solved as soon as possible. |
@wiesson can you share your tsconfig? |
Sure! {
"compilerOptions": {
"target": "ES2020",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": false,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"baseUrl": "src",
"paths": {
"@/components/*": ["components/*"],
"@/lib/*": ["lib/*"],
"@/utils/*": ["utils/*"],
"@/types/*": ["types/*"]
}
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
"exclude": ["node_modules"]
} it is more or less the default tsconfig of Nextjs |
Possibly caused by f3b2fc4 which added I've never seen this directive used in library typings so I can't say what this commit tried to solve. Maybe @lquixada has some insight? |
This is breaking the At this point, my whole project is unusable, is there a workaround (like a smart edit of the And I can concur about the triple slash directive, it's what causing the issue. |
hey all! sorry for the trouble! adding local types to cross-fetch has been trickier than originally thought so I'm reverting those changes so everyone can run it safely. Please let me know if |
For anyone affected by this, you can add the following to "resolutions": {
"cross-fetch": "3.1.4-alpha.0"
} |
@lquixada I can confirm that it fixes it for my project! |
just released |
When installing cross-fetch v3.1.3, it somehow overrides the typescript settings. Despite having
dom
in lib in the tsconfig, Typescript starts to complain about e.g.window
andURLSearchParams
. If I downgrade to v3.1.2, it does not happen. Maybe you have an idea, why cross-fetch somehow overrides "everything" (?)I'm using it with nextjs (latest version)
The text was updated successfully, but these errors were encountered: