프로그래밍 언어/JS TS

This is not the tsc command you are looking for 에러 해결하기

트리맨스 2022. 11. 5. 22:09
반응형

 

Express를 JS에서 TS로 마이그레이션을 하는 도중, tsc를 사용해 js로 컴파일 할려고 tsc 명령어를 치니 다음과 같은 에러 메시지가 나왔다.

 

                                                                               
                This is not the tsc command you are looking for                
                                                                               

To get access to the TypeScript compiler, tsc, from the command line either:

- Use npm install typescript to first add TypeScript to your project before using npx
- Use yarn to avoid accidentally running code from un-installed packages

 

검색을 해보니, 해당 문제는 tsc 패키지와 typescript 패키지가 충돌해서 생기는 문제라고 한다. 그래서 tsc 패키지가 따로 설치되어 있으면, 해당 패키지를 삭제하면 된다.

npm uninstall tsc

 

참고자료

https://stackoverflow.com/questions/67677320/this-is-not-the-tsc-command-you-are-looking-for

 

This is not the tsc command you are looking for

When I run tsc in the terminal (it does not matter where) I get returned: This is not the tsc command you are looking for I do not have TypeScript installed globally to my knowledge so what I am

stackoverflow.com

 

반응형