Error: Can't resolve 'date-fns/format'
See original GitHub issueWhy am I getting:
Module not found: Error: Can’t resolve ‘date-fns/format’
after installing date-fns like this:
npm install date-fns --save
I am requiring it like this:
const format = require('date-fns/format');
I can see this in my package.json file:
"dependencies": { "date-fns": "^1.29.0" }
and I can also see the module in node_modules
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:14 (2 by maintainers)
Top Results From Across the Web
Module not found: Can't resolve '@date-io/date-fns'
I'm using React Material UI and I get this error : Module not found: Can't resolve '@date-io/date-fns'. Here are the dependencies that I...
Read more >Module not found: Can't resolve '@date-io/date-fns' | bobbyhadz
To solve the error "Module not found: Error: Can't resolve '@date-io/date-fns'", make sure to install the package by opening your terminal in your...
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 >Can't resolve 'date-fns/_lib/format/longFormatters'
can't resolve 'date-fns/_lib/format/longformatters'. Add Answer | View In TPC Matrix. Technical Problem Cluster First Answered On July 12, 2021 Popularity ...
Read more >date-fns | Yarn - Package Manager
This project adheres to Semantic Versioning. This change log follows the format documented in Keep a CHANGELOG. v2.29.3 - 2022-09-13. This release is...
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 Free
Top 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
I believe that’s unrelated to date-fns. However please make sure that format is there (see a snippet below) and you require it from a file that has access to
node_modules.I just got the same error!
It never happened before and I am using the latest versions of both, npm and node.