Latest angular (5.x) support
wesleycoder opened this issue · 6 comments
I'm using @angular/common ^5.1.0-rc.0.
My build breaks on production with npm ERR! peerinvalid Peer @ngx-translate/http-loader@2.0.0 wants @angular/common@>=4.3.0
Would be nice if the peerDependencies was something like "@angular/common": ">=4.3.0 || >=5.0.0"
Are you still using npm 2? With npm 3 ">=4.3.0" should also include 5.x
I'm actually using yarn locally.
The thing is that my project is a Ionic app that is being built with the Ionic Pro service that uses npm v2.15.12.
Any workarounds for this?
Just to clarify, why do you use >=
instead of ^
when ^
being the default for npm and it gives more flexibility?
I think that it will not be needed anymore.
There's no documentation, but I tried specifying the npm
version in the package.json
and the build passed.
// ...
"engines" : {
"node" : "^8.0.0",
"npm" : "^3.0.0"
},
// ...
It seems that Ionic Pro supports engines
in package.json
, but there is no documentation about it.
Just to clarify, why do you use >= instead of ^ when ^ being the default for npm and it gives more flexibility?
for that kind of reasons, because ^
means the current major only (^4.x), when >=
means the current major and the next majors as well
You can test the different options here: https://semver.npmjs.com/
Oh, I didn't have that in mind.
I'll put this in my "research later" list 😶.
Confirmed that engine
actually works.
Checking the build log I found:
npm info using npm@5.3.0
npm info using node@v8.2.1
I've made a request on the Ionic Forum about documenting this behavior