2017-12-26 4 views
0

내 proyect를 angular5로 업그레이드 중입니다.각도/cli 및 타이 스크립트 버전 컴파일 오류

내 package.json에

: 그것은 작동

"dependencies": {  
    "highcharts-export-csv": "git+https://github.com/highcharts/export-csv.git" 
} 
"devDependencies": { 
    "@angular/cli": "1.6.2", 
    "@angular/compiler-cli": "~5.1.2", 
    "typescript": "^2.6.2" 
} 

,하지만 난 경고 있어요 :

@angular/[email protected] requires [email protected]'>=2.4.2 <2.6.0' but 2.6.2 was found instead. 
Using this version can result in undefined behaviour and difficult to debug problems. 

Please run the following command to install a compatible version of TypeScript. 

npm install [email protected]'>=2.4.2 <2.6.0' 

To disable this warning run "ng set warnings.typescriptMismatch=false". 

그래서, 나는 2.5.3 내 타이프 라이터 버전을 변경하지만 지금은 컴파일 오류가를 , cli와 타이프 스크립트 버전이 일치하지 않을 때 나는 가지지 않았다.

그것은 긴 오류,하지만 내가 여기 잘못 아니에요 경우의 열쇠입니다 :

ERROR in ./src/app/myCsv/myCsv.module.ts 
Module not found: Error: Can't resolve 'highcharts-export-csv' in '/myRoute/myCsv' 
resolve 'highcharts-export-csv' in '/myRoute/src/app/myCsv' 
Parsed request is a module 
using description file: /myRoute/package.json (relative path: ./src/app/myCsv) 
Field 'browser' doesn't contain a valid alias configuration 
after using description file: /myRoute/package.json (relative path: ./src/app/myCsv) 
resolve as module 
+1

와 각도 CLI에서 TS 경고를 해제 할 수 있습니다 내가 어떻게 이해할 수 없다 그러나 2.6.2 typescript 버전을 설치하면 작동하며 경고가 표시되지 않습니다. 나는 그것을 무시할 수 있습니까? – cucuru

답변

0

당신은

ng set warnings.typescriptMismatch=false 
+0

좋아, 붙여 넣기 경고에, 나는 그것을 무시하는 것보다 낫다고 생각한다. 나는 내 의존성에 호환되는 버전을 선호한다. 어쨌든 고마워! – cucuru

관련 문제