• 카테고리

    질문 & 답변
  • 세부 분야

    프론트엔드

  • 해결 여부

    해결됨

awesome-typescript-loader 설치 에러 관련

20.11.06 15:25 작성 조회수 355

0

안녕하세요 강사님. 강의 잘 듣고 있습니다.

'awesome-typescript-loader ' 설치 시 아래와 같은 에러 발생하여 --force 옵션으로 강제 설치했습니다. 앞의 강의에서 해당 모듈 설치 때, 아래와 같은 에러가 발생하여 그냥 넘어갔더니 npx webpack 명령어 입력 시 app.js 생성에 또 문제가 생겨서 --force 명령으로 해결했습니다.

혹시 이와 같은 방법에 문제가 있다면 다른 접근법을 알려주시면 감사하겠습니다.

---------------------------------------------------------

npm ERR! code ERESOLVE

npm ERR! ERESOLVE unable to resolve dependency tree

npm ERR!

npm ERR! While resolving: lecture_ts@1.0.0

npm ERR! Found: typescript@4.0.5

npm ERR! node_modules/typescript

npm ERR!   typescript@"^4.0.5" from the root project

npm ERR!

npm ERR! Could not resolve dependency:

npm ERR! peer typescript@"^2.7 || ^3" from awesome-typescript-loader@5.2.1

npm ERR! node_modules/awesome-typescript-loader

npm ERR!   dev awesome-typescript-loader@"^5.2.1" from the root project

npm ERR!

npm ERR! Fix the upstream dependency conflict, or retry

npm ERR! this command with --force, or --legacy-peer-deps

npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

npm ERR! 

npm ERR! See C:\Users\master\AppData\Local\npm-cache\eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:

npm ERR!     C:\Users\master\AppData\Local\npm-cache\_logs\2020-11-06T06_21_30_388Z-debug.log

답변 3

·

답변을 작성해보세요.

1

4버전으로 하시려면

awesome-typescript-loader 대신 ts-loader 8버전을 사용하시면 됩니다.

0

GentleM님의 프로필

GentleM

질문자

2020.11.06

감사합니다. ts-loader 설치해서 사용하니까 에러 없이 잘 돌아갑니다. 

0

제 강좌에서 typescript는 3버전 사용하셔야 합니다. awesome-typescript-loader가 4버전을 지원하지 않습니다. 저는 atl 대신 @babel/preset-typescript로 웹팩과 연동하고 있습니다. 영상 수정은 조금 힘들어서 소스코드라도 최신 4버전으로 업데이트하겠습니다.