본문 바로가기

오류처리/react 오류처리

ubuntu 서버 프론트 npm i 시 “ /usr/bin/bit ls-remote -h -t ....” 에러해결

*추측:

permission denied 및 remote repository가 본인 계정이 아니여서 에러가 났나 싶어,

(초기 클론한 깃 주소가 페이깃허브이므로) 1.heringsit 계정에 stoma 하나 더 생성한후 코드 복사

2.ubuntu 접속후 (ssh -i "/Users/herings/Documents/ircc_keypare.pem" ubuntu@15.165.140.143) git clone “옮긴 heringsit 깃 주소"

3.npm i (⇒react quil과 react-pdf 노드 모듈이 노드 버전이 안맞아서 그런지 다시 에러가뜸) 시 에러가 떠서 npm i —legacy-peer-deps 처리

4.cp webpack.config.js node_modules/react-scripts/config/webpack.config.js (외부에 빼놓은 react-pdf 관련 webpack 설정 파일을 noed_nodules에 복사해줌)

5.npm run build 후 pm2 생성 및 pm2 start