2017-12-26 9 views
0

私のproyectをangular5にアップグレードします。私のpackage.jsonでangular/cliとtypescriptバージョンのコンパイルエラー

"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に私のtypescriptですバージョンを変更したが、今、私はコンパイルエラーを持っています、私はcliとtypescriptのバージョンが一致しなかったときはない。

それは長いエラーだが、私はここで間違っていないよ場合のキーである:私はどのように理解することはできません

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タイコ版をインストールすると動作し、警告は表示されません。私はそれを無視することはできますか? – cucuru

答えて

0

あなたは

ng set warnings.typescriptMismatch=false 
+0

これは、貼り付けた警告にあります。私はそれを無視するよりも解決しやすいと思います。私は依存関係の中で互換性のあるバージョンを使用することをお勧めします。とにかくありがとうございました! – cucuru

関連する問題