TS2307 Cannot find module '@date-io/type'
See original GitHub issueEnvironment
Tech | Version |
---|---|
@material-ui/pickers | 3.0.0 |
material-ui | 4.0.1 |
React | 16.8.5 |
Browser | irrelevant |
Peer library | date-fns@next |
Steps to reproduce
-
create a project with ts and react
-
install @material-ui/picker
-
use the DatePicker with the provider and try to build it
-
should fail
Expected behavior
My app should build 💃
Actual behavior
../../node_modules/@material-ui/pickers/DatePicker/components/YearSelection.d.ts:2:26 - error TS2307: Cannot find module '@date-io/type'.
2 import { DateType } from '@date-io/type';
~~~~~~~~~~~~~~~
../../node_modules/@material-ui/pickers/typings/date.d.ts:1:26 - error TS2307: Cannot find module '@date-io/type'.
1 import { DateType } from '@date-io/type';
~~~~~~~~~~~~~~~
How to fix it
From what i saw the type DateType
does not exist on @date-io/type
(because @date-io/type
does not exist)
We should create this type manually instead of trying to import it from a place that doesnt exist.
Or maybe i just missed some steps or i forgot something but i hope not, it would be embarrassing 🤣!
Issue Analytics
- State:
- Created 4 years ago
- Reactions:7
- Comments:30 (21 by maintainers)
Top Results From Across the Web
TS2307 Cannot find module '@date-io/type' · Issue #1074
How to fix it. From what i saw the type DateType does not exist on @date-io/type (because @date-io ...
Read more >tsc throws `TS2307: Cannot find module` for a local file
ts(5,20): error TS2307: Cannot find module 'components/button'. It complains about all imports of local files, like the following: import Counter from ' ...
Read more >How to import my own module from a test file? : r/typescript
I'm working on a node package but can't seem to figure out how to import said package from the test ... r/typescript •...
Read more >ReactJS
He guys, please I need some help with my NextJS/NodeJS project. I'm having the error: TypeError: Cannot read property '_id' of undefined at...
Read more >DesktopDatePicker API - MUI X
Name Type Default
onChange * func
renderInput * func
acceptRegex RegExp /\dap/gi
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
im getting this too with
@date-io/luxon
please resolve
Closing that. Here is a repo where auto-linked @date-io/type module works like a charm
yarn tsc
succed