0

I'm upgrading my project to angular5.

in my 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"
}

It works, but I got a warning:

@angular/[email protected] requires typescript@'>=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 typescript@'>=2.4.2 <2.6.0'
To disable this warning run "ng set warnings.typescriptMismatch=false".

So, I changed my TypeScript version to 2.5.3 but now I have compilation error, which I haven't when cli and TypeScript versions didn't match.

It's a long error, but if I am not wrong here is the key:

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
  • 1
    I can't understand how but installing 2.6.2 typescript version, works and the warning is not shown. Can I ignore it? Commented Dec 26, 2017 at 14:18

1 Answer 1

0

You can disable the TS warning from the Angular CLI with

ng set warnings.typescriptMismatch=false
Sign up to request clarification or add additional context in comments.

1 Comment

Ok, that's in the warning I pasted, I suppose it's better solve than ignore, and I prefer use compatible version in my dependencies. Thank you anyway!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.