개인공부/etc

vscode , github 오류 , npm 등등

minseokiim 2023. 7. 20. 15:03

1. prettier설치했는데 적용  x 해결 :


settings에서

​"editor.defaultFormatter": "esbenp.prettier-vscode"

"editor.formatOnSave": true

"editor.showUnused": true 체크,  vscode 재시작


2. warning: in the working copy of 'src/App.js', LF will be replaced by CRLF the next time Git touches it

이유: 줄 바꿈에 대한 문자열이 다르기 때문에 CR과 LF 중 어느쪽 선택할지 경고, "Format On Save"기능 때문인걸로 유추

해결: git config --global core.autocrlf true (윈도우인 경우)



3. error: src refspec main does not match any 

이유: pull 없이 push 해서 생긴 오류, 순서대로 다시 git add . 부터 해주면 됨

git add .

git commit -m "~"

git remote add origin ~~

git push origin master


4. 리액트 버전문제로 강제 설치할때

npm install 라이브러리 --legacy-peer-deps