환경 : MacOS


react native could not find a declaration file for module 'styled-components/native' 에러

 

문제 : 프로젝트 내에서 styled-components 모듈을 설치하고 styled-components/native를 사용하려는 데 발생하는 에러

 

해결 : https://velog.io/@lets_gojae/React-native-%ED%94%84%EB%A1%9C%EC%A0%9D%ED%8A%B8-%EC%A4%80%EB%B9%84typescript-styled-components

 

React native 프로젝트 준비(typescript, styled-components, babel-plugin-root-import)

react-native init projectnamecd ProjectNamenpm install --save styled-components

velog.io

터미널에서 npm add @types/styled-components-react-native -D 입력하여 설치 후 해결


Module AppRegistry is not a registered callable module {calling runApplication} 에러

문제 : 에뮬레이터 실행 시 Module AppRegistry is not a registered callable module {calling runApplication} 에러 발생 

 

해결 :  stackoverflow.com/questions/43604603/module-appregistry-is-not-registered-callable-module-calling-runapplication

 

Module AppRegistry is not registered callable module (calling runApplication)

I am using native base for making app in react-native. I am new to both things. When I run the app It gives me this error: Here is my code: export default class Point extends Component { ren...

stackoverflow.com

스택오버플로우의 첫 번째 답변을 통해 해결하였다. (node의 모든 프로세스를 종료 후 재시작)


❓패키지 매니저를 통해 라이브러리 삭제 후 android에서 App install이 실패하는 에러

(error: package com.oblador.vectoricons does not exist)

 

문제: yarn을 통해 사용하지 않는 라이브러리를 삭제 후 안드로이드 실행 시 인스톨이 실패하는 문제 

 

 

에러

 

해결 :

여러 방법을 찾아보고 시도해 봤으나 모두 실패.

나는 사용하지 않는 라이브러리에 대한 의존성을 지우고 싶은 경우이고,

많은 에러 케이스들은 라이브러리 설치 후 안드로이드 파일 내에서 의존성에 대한 명시가 안되어 있을 수 있으니 추가하도록 알려주는 해결방법이 많았다.

(이게 의존성에 대한 문제인지 뭔지는 정확하게 모른다. 근데 import가 나오니 그런 것 같다. 😳)

 

결국 vscode내에서 찾기 힘들어서 따로 안드로이드 스튜디오를 열어보니 바로 어디가 잘못되어 있는지 확인 가능!

(진작 열어볼걸...! 🤯)

 

 

네모 친 부분들을 지워주니 정상적으로 앱 사용이 가능하게 되었다.


'개발 > React Native' 카테고리의 다른 글

TIL #24 React Native -2  (0) 2021.05.09
TIL #23 React Native - 1  (0) 2021.04.21
TIL #21 (RN프로젝트 에러 모음)  (0) 2021.04.15

+ Recent posts