Reputation: 2814
I just updated my angular project. Everything seems to be fine except I get the following warnings:
npm WARN @angular-devkit/[email protected] requires a peer of typescript@>=3.1 < 3.5 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/[email protected] requires a peer of typescript@>=3.4 <3.5 but none is installed. You must install peer dependencies yourself.
npm WARN @ngtools/[email protected] requires a peer of typescript@>=3.4 < 3.5 but none is installed. You must install peer dependencies yourself.
I went into my package.json
and under devDependencies
i had the following:
"typescript": "~3.5.1",
So I changed it to:
"typescript": "^3.4.0",
I then deleted node_modules
and ran npm install
, but the warnings are still there. The command npm ls typescript
returns the following:
[email protected] C:\Users\jbra\Programs\intergun
`-- @angular-devkit/[email protected]
`-- @angular-devkit/[email protected]
`-- [email protected]
So it looks like it is indeed using typescript version 3.4.4. which should satisfy the requirements in the warnings.
What is the problem here? Have I done anything wrong?
Upvotes: 0
Views: 864
Reputation: 26
use should use ~ or none. when you use the tilde ~ it will match the most recent patch version (the third number) for the specified minor version (the second number). ~3.4.0 will match all 3.4.x versions.
when you use the caret ^ it matches the most recent minor version (the second number) for the specified major version (the first number). that is you will be using ^3.x.x
Here's a visual explanation of the concepts:
Upvotes: 1