[SOLVED] Could not find a declaration file for module 'react-slick'


import Slider from "react-slick";

i have imported react slick also installed it.

import React, { useEffect, useRef,useState } from 'react';
import Slider from "react-slick";
import '../Styles/Work.css' ;
const Work = () => {
  return (
    <div style={{height:"100vh"}} ref={ref} className='work-container' id="work">
      <h1 ref={title} className='work-title'>
        MY WORKS
      {/* {inView && navigate('/#about')}   */}

export default Work

packagelock file

"react-scripts": "5.0.0",
"react-slick": "^0.28.1",
"react-slick-carousel": "^0.14.9",

it’s displays in my package-lock too. what’s the issue here?? i am using react with typescript


You have to install the types for ‘react-slick’ @types/react-slick . Make sure its on your package.json as well as r@types/react


Answered By – noobprogrammer

Answer Checked By – Katrina (BugsFixing Volunteer)

Leave a Reply

Your email address will not be published. Required fields are marked *