nestjs new project 에러

·2023년 2월 23일
0

nestjs

목록 보기
1/10

과정

윈도우10, wsl2 (ubuntu 20.04) 환경에서 node 설치,
sudo npm i -g @nestjs/cli

nest new project-name 를 시전했는데
아래와 같은 에러를 만났다.
(특히 에러가 뜨기 전까지 Installation in progress.. 상태로 시간이 꽤나 오래 걸렸다.)

▸▹▹▹▹ Installation in progress... ☕
Failed to execute command: npm install --silent
✖ Installation in progress... ☕
🙀 Packages installation failed!
In case you don't see any errors above, consider manually running the failed command npm install to see more details on why it errored out.

원인

정확한 원인은 아직 못 찾은 것 같지만 결론적으로 한국의 KT 통신망 이용자만 경험하는 ts-jest 설치 에러라고 한다. (nestjs에 포함된 ts-jest 설치가 안 되어서 실패한 것)

해결책

다음 명령어를 통해 npm 레지스트리 주소를 mirror로 바꾼 뒤에 동일 명령어를 실행하면 ts-jest를 정상적으로 설치할 수 있어서 해결
npm config set registry https://registry.npmjs.cf/

설치가 끝난 뒤에는 다음 명령어를 통해 다시 원래의 레지스트리 주소로 돌려놓을 수 있따.
npm config set registry https://registry.npmjs.org/

references

https://tre2man.tistory.com/345?category=735754
https://velog.io/@librarian/ts-jest-%EC%84%A4%EC%B9%98-%EC%95%88%EB%90%98%EB%8A%94-%ED%98%84%EC%83%81
https://github.com/kulshekhar/ts-jest/issues/3992

profile
백엔드 개발자. 공동의 목표를 함께 이해한 상태에서 솔직하게 소통하며 일하는 게 가장 즐겁고 효율적이라고 믿는 사람.

0개의 댓글