Не подключается date-fns. В чем может быть причина?

Делаю проект.

Установил библиотеку date-fns на клиент. (npm i date-fns)

На клиенте происходит следующая ошибка:

Failed to compile
./src/components/Events/Event/Event.js
Module not found: Can't resolve 'date-fns' in '/client/src/components/Events/Event'

/src/components/Events/Event/Event.js:

import { parseISO, formatDistanceToNow, format } from 'date-fns';

package.json (client):

{
  "name": "front",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "axios": "^0.21.1",
    "card-validator": "^8.1.1",
    "classnames": "^2.3.1",
    "date-fns": "^2.29.1",
    "flickity": "^2.2.2",
    "formik": "^2.2.6",
    "history": "^5.0.0",
    "lodash": "^4.17.21",
    "moment": "^2.29.1",
    "query-string": "^7.0.0",
    "react": "^17.0.2",
    "react-confirm": "^0.1.23",
    "react-confirm-alert": "^2.7.0",
    "react-credit-cards": "^0.8.3",
    "react-dom": "^17.0.2",
    "react-flickity-component": "^3.6.1",
    "react-image-lightbox": "^5.1.1",
    "react-input-mask": "^2.0.4",
    "react-rating": "^2.0.5",
    "react-redux": "^7.2.4",
    "react-router-dom": "^5.2.0",
    "react-scripts": "4.0.3",
    "react-spinners": "^0.10.6",
    "react-toastify": "^7.0.4",
    "redux": "^4.1.0",
    "redux-devtools-extension": "^2.13.9",
    "redux-saga": "^1.1.3",
    "require-context": "^1.1.0",
    "socket.io-client": "^4.1.1",
    "validator": "^13.6.0",
    "yup": "^0.32.9"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject",
    "storybook": "start-storybook",
    "build-storybook": "build-storybook -s public"
  },
  "eslintConfig": {
    "extends": "react-app"
  },
  "browserslist": [
    ">0.2%",
    "not dead",
    "not ie <= 11",
    "not op_mini all"
  ],
  "devDependencies": {
    "eslint": "^7.26.0",
    "eslint-config-airbnb": "^18.2.1",
    "sass": "^1.52.3"
  }
}

Ответы (0 шт):