3.5.0 breaks when building


#1

Hi all, I just installed the 3.5.0 release along with latest typescript and angular (using ncu -a to update my package-json).
Since then I just can’t build and get the following errors

[07:55:14] typescript: node_modules/ionic-angular/components/nav/nav.d.ts, line: 47
Class ‘Nav’ incorrectly extends base class ‘NavControllerBase’. Types of property ‘goToRoot’ are
incompatible. Type ‘(opts: NavOptions) => Promise’ is not assignable to type ‘(opts: NavOptions) =>
Promise’. Type ‘Promise’ is not assignable to type ‘Promise’. Type ‘any’ is not
assignable to type ‘never’.

build is crashing inside ionic-angular for several other reasons:

  • typescript: node_modules/ionic-angular/components/tabs/tab.d.ts, line: 121 same problem with any / never
  • typescript: node_modules/rxjs/Subject.d.ts, line: 16
    Class ‘Subject’ incorrectly extends base class ‘Observable’. Types of property ‘lift’ are
    incompatible. Type ‘(operator: Operator<T, R>) => Observable’ is not assignable to type ‘(operator:
    Operator<T, R>) => Observable’. Type ‘Observable’ is not assignable to type ‘Observable’. Type 'T’
    is not assignable to type ‘R’.

so my guess is that I have probably one package or another too recent, like typescript or angular, and I’ll dig this.
If anyone knows what’s going on, thanks in advance for helping !


Following errors appears after upgrading
#2

OK After some tests it seems that I can install ionic-angular 3.5.0 but not latest typescript (currently 2.4.1). I upgraded every single library / framework to latest in my environment and just downgraded typescript to 2.3.4 and it’s working fine.

Hope this may help.


#3

Ionic normally publishes a set of “recommended” dependencies in their Release Notes and Changelog: https://github.com/ionic-team/ionic/blob/master/CHANGELOG.md#steps-to-upgrade-1 Normally it’s best to use these values instead of upgrading to the newest and latest. (But of course Ionic then itself releases new versions of e.g. @ionic/app-scripts at 1.3.12 right now)


#4

I got this error on MacOS Sierra after updating this morning. Then I was unable to install TypeScript 2.3.4 (I had 2.4.0 installed) because “npm install typescript@2.3.4” kept saying “typescript@2.3.4: invalid”. I had to upgrade node from 6.x to 8.1.3 and then it worked. Then I also had to do “npm rebuild node-sass --force” to rebuild it for node 8.1.3 before it would actually run.


#5

it works when downgrading to 2.3.4
Thanks alot loicsalou !