티스토리 뷰

28 02 2019 04:22:20.022:ERROR [compiler.karma-typescript]: node_modules/@types/node/module.d.ts(2,5): error TS2300: Duplicate identifier 'mod'.


28 02 2019 04:22:20.056:ERROR [compiler.karma-typescript]: node_modules/@types/requirejs/index.d.ts(38,11): error TS2300: Duplicate identifier 'mod'.


28 02 2019 04:22:20.056:ERROR [compiler.karma-typescript]: node_modules/@types/requirejs/index.d.ts(422,13): error TS2403: Subsequent variable declarations must have the same type.  Variable 'require' must be of type 'NodeRequire', but here has type 'Require'.


Karma 에서 typescript 를 적용했는데 이러한 에러가 계속적으로 났다.

에러내용으로 보면, requirejs 랑 node 는 둘다 require 를 가지고 있으므로 두 모듈이 동시에 설치됬기 때문에 conflict 났음을 알 수 있다.


해결방법


 requirejs 를 global node_modules 와 project node_modules 에서 모두 지워준다 


'프로그래밍 언어 > typescript' 카테고리의 다른 글

Karma 오류 : cannot find module 'typescript'  (0) 2019.02.28
댓글