Error: Cannot find module 'date-fns/isValid'
See original GitHub issueHello guys
Using node 8.x and 10.x I have this error
Error: Cannot find module 'date-fns/isValid'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15)
at Function.Module._load (internal/modules/cjs/loader.js:508:25)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object.<anonymous> (/MyProject/node_modules/validatorjs/src/rules.js:1:77)
at Module._compile (internal/modules/cjs/loader.js:701:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
at Module.load (internal/modules/cjs/loader.js:600:32)
at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
at Function.Module._load (internal/modules/cjs/loader.js:531:3)
Please check https://www.npmjs.com/package/date-fns
Actually, I solved the problem using @date-fns/upgrade in my project.
npm install @date-fns/upgrade --save
Thanks a lot 👍
Issue Analytics
- State:
- Created 4 years ago
- Reactions:6
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Cannot find module 'date-fns' - Stack Overflow
Try using this instead First import the modules. In the terminal type npm install date-fns @types/date-fns. Then in code
Read more >Cannot find module 'date-fns' error | bobbyhadz
To solve the error "Cannot find module 'date-fns'", make sure to install the date-fns package by opening your terminal in your project's root...
Read more >Error: Cannot find module 'date-fns/isValid' · Issue #350 - GitHub
Hello guys Using node 8.x and 10.x I have this error Error: Cannot find module 'date-fns/isValid' at Function.Module.
Read more >Cannot find module 'date-fns' error [Solved] - Reactgo
To solve the can't find module date-fns error, install the date-fns module in your project directory by running the npm install date-fns command ......
Read more >date-fns - npm
date -fns provides the most comprehensive, yet simple and consistent toolset for manipulating JavaScript dates in a browser & Node.js.
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
Sorry for delay on this, I will get this cured ASAP and post a fix. Not sure where the regression occurred, but I will remedy it. In the meantime, installing
date-fns
manually will cureI have patched the 3.18 release (verison 3.18.1) which fixes this regression.