[ts] Could not find a declaration file for module 'react' react에서 typescript를 설치하고 app.tsx 에서 router를 설치하는데 이런 오류가 나왔습니다. 오류 메시지 Could not find a declaration file for module 'react'. '/Users/inkijo/Documents/react-test/my-books/node_modules/react/index.js' implicitly has an 'any' type. If the 'react' package actually exposes this module, consider sending a pull request to amend 'https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react.. [react] Property 'x' does not exist on type '{}'.ts 오류 해결 리액트 hooks, typescript 프로젝트에서 아래와 같은 오류가 났습니다. 오류 메시지 Property 'x' does not exist on type '{}'.ts 해결 방법 useState() 에서 useState()를 추가해줍니다. 배열 const [arr, setArr] = useState([]) 객체1 const [userInfo, setUserInfo] = useState({}) 객체2 const [searchDate, setSearchDate] = useState({ start: '', end: '' }); 이전 1 다음 반응형