My code works but under my import statements I have 2 dots and if I hover over them it shows the error
Could not find a declaration file for module 'chartjs-adapter-date-fns'. '/home/user/dev/website/client/node_modules/chartjs-adapter-date-fns/dist/chartjs-adapter-date-fns.js' implicitly has an 'any' type.
Try `npm i --save-dev @types/chartjs-adapter-date-fns` if it exists or add a new declaration (.d.ts) file containing `declare module 'chartjs-adapter-date-fns';`ts(7016)
I tried yarn add -D @types/chartjs-adapter-date-fns but that seems not to exist. Is the problem that I am missing the typescript types? How can I get rid of this error?
My import statements just in case:
import {
CategoryScale,
Chart as ChartJS,
Filler,
Legend,
LinearScale,
LineElement,
PointElement,
TimeScale,
Title,
Tooltip,
} from 'chart.js'
import 'chartjs-adapter-date-fns'
import { enGB } from 'date-fns/locale'
import { Line } from 'react-chartjs-2'
import { useMarketDataQuery } from '../generated/graphql'
import BaseCard from './BaseCard'