You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't know if this is an issue with my local environment but when I try to run npm run lint react-router (or for other React related libraries) I get this error:
Error: Errors in typescript@3.9 for external dependencies:
../react/index.d.ts(36,22): error TS2307: Cannot find module 'csstype' or its corresponding type declarations.
I tried this with a fresh clone of DT as well as with my own fork. I noticed that the CI build doesn't seem to have this issue.
The text was updated successfully, but these errors were encountered:
I figured it out. react is imported by react-router (not surprisingly) which is defined in DT, so comes from types/react, and types/react has it's own package.json that lists csstype as an external dependency (not in DT). I needed to npm install from types/react to get the full dependencies for react-router. This makes sense now, but it was a bit of a surprise.
For future people finding this issue (like me!), the same error message is currently appearing when using @types/react in a project due to a mistake in 16.14.1, fixed in #49717 (not yet published). In the meantime, downgrading to @types/react@16.14.0 fixes it.
I don't know if this is an issue with my local environment but when I try to run
npm run lint react-router
(or for other React related libraries) I get this error:I tried this with a fresh clone of DT as well as with my own fork. I noticed that the CI build doesn't seem to have this issue.
The text was updated successfully, but these errors were encountered: