Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Module not found: Error: Can't resolve 'react-select' with typescript

module import is not working for me. I'm tried different solutions provided from stack overflow and other. These are steps I'm follow the react-select

npm install --save @types/react-select

import the module like this

import Select from "react-select"

but I got the error

Module not found: Error: Can't resolve 'react-select'

import * as React from "react";
import ReactSelect from 'react-select'
export class Select extends extends React.Component<someProps>{

render(){
   return(
  <Select id="color" options={options} />
);
}
}

But I can't find the way to fixed this.

like image 458
Namindu Sanchila Avatar asked Mar 05 '23 02:03

Namindu Sanchila


1 Answers

I got solution by npm i react-select.

like image 157
Ashwani Panwar Avatar answered Mar 07 '23 16:03

Ashwani Panwar