date-fns: Can't resolve 'date-fns/_lib/format/longFormatters'
Code:
import DateFnsUtils from '@date-io/date-fns';
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 14
- Comments: 19 (1 by maintainers)
Code:
import DateFnsUtils from '@date-io/date-fns';
You probably forgot to install date-fns
or
fixed the issue: npm i @date-io/date-fns@1.x date-fns
npm i @date-io/date-fns@1.x date-fns after installing just restart the server only then, this worked
@GDIBass didnt help
Closing as this is
date-fnsInstall the version below instead and run npm start after installation is completed
npm i --save date-fns@next @date-io/date-fns@1.x
this didn’t fix the error for me. still receiving
RangeError: Format string contains an unescaped latin alphabet charactern` errorJust add
"date-fns": "2.13.0",to your package.jsonthanks @zahidalidev
I got the same error after installing latest version: RangeError: Format string contains an unescaped latin alphabet character
n(anonymous function) C:/…/node_modules/date-fns/esm/format/index.js:421 418 | } 419 | 420 | if (firstCharacter.match(unescapedLatinCharacterRegExp)) {