-
[Typescript] Could not find a declaration file for module 'react' - 에러 해결
2021. 3. 19.
리액트로 파일을 작성 하게되면 확장자 ".tsx" 를 사용하는데, 이 때 발생하는 react module을 찾지 못한다는 발생하였다.
이와 같은 문제가 발생 했을 때, 하단의 코드를 통해 해결이 가능하다.
npm install --save @types/react @types/react-dom
'Develop > TypeScript' 카테고리의 다른 글
[TypeScript] 타입(type) vs 인터페이스(interface) (0) 2021.03.16 [TypeScript] 객체지향의 특징 2편 Interface (0) 2021.03.11 [TypeScript] 객체지향의 특징 1편 ( 캡슐화[Encapsulation] , Getter & Setter ) (0) 2021.03.11 [TypeScript] 객체지향이란(What is Object Oriented Programing) ? (0) 2021.03.08 댓글