6월, 2021의 게시물 표시

[FireBase]undefined is not an object (evaluating 'firebase.apps.length') 오류

  파이어베이스 라이브러리의 버전이 업데이트 되면서 import 의 사용법이 달라짐. firebaseConfig.js 파일에서, import * as firebase from 'firebase/app'; 를 import firebase from 'firebase/app'; 로 바꿔주면 해결~!!! ++++++ The usage of import changes as the version of the Firebase library is updated. import * as firebase from 'firebase/app'; -----> import firebase from 'firebase/app';

[VScode]Unexpected token ';' / no stack 오류

이미지
 vscode 터미널에 SyntaxError: Unexpected end of JSON input while parsing near '' at JSON.parse(<anonymous>) 라는 메세지가 뜨면서 앱 작동이 되지 않는다. 프로젝트의 data.json 파일이 저장이 안되었을 가능성이 있으니, data.json 파일을 저장하고 휴대폰 앱을 재실행하면 잘 작동하는 것을 볼 수 있다. 코딩할때는 수시로 저장하는 습관을 들이는 것이 좋겠다.    +++++++   The app does not work with the message "SyntaxError: Unexpected end of JSON input while parsing near '' at JSON.parse(<anonymous>)" in the vscode terminal. There is a possibility that the data.json file of the project was not saved, so if you save the data.json file and run the phone app again, you can see that it works well. It is good to get into the habit of saving frequently when coding.