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.
Module not found: Error: Can't resolve 'react-select'
? Is it shown by TS in editor or by JS in runtime? – Kleemannpm list --depth=0
showsreact-select
? – Kleemannpm run build
), you should run it. If you use create-react-app, you should runnpm start
– Kleeman