Infrastructure
typescript 프로젝트 실행안될 시
RuTel
2022. 3. 14. 00:09
728x90
내 경우엔 typescript를 기본으로 사용하는 nest project가 실행이 안되어서 에러로그를 보니
TS2688 에러가 났다.
➜ ch1-intro git:(main) ✗ npm run start
> book-nestjs-backend@1.0.0 start
> nest start
error TS2688: Cannot find type definition file for 'uglify-js'.
The file is in the program because:
Entry point for implicit type library 'uglify-js'
error TS2688: Cannot find type definition file for 'webpack-sources'.
The file is in the program because:
Entry point for implicit type library 'webpack-sources'
Found 2 error(s).
그래서 아래와 같이 정의를 찾지 못하는 패키지를 설치
$ npm install --save @types/webpack-sources
$ npm install --save @types/uglify-js
그 후 npm run start를 하니 실행이 되긴했는데 찝찝한 기분이다...
다른 해결책이나 비슷한 오류를 보신 분이 있으면 댓글 달아주시면 감사하겠습니다.