Skip to content

Instantly share code, notes, and snippets.

View Ritzlgrmft's full-sized avatar

Markus Wagner Ritzlgrmft

View GitHub Profile
@Ritzlgrmft
Ritzlgrmft / FixingPresetProblemAfterUpgrading.md
Last active February 25, 2018 18:59
karma-typescript-es6-transform: Fixing preset problem after upgrading

Recently, I upgraded the devDependencies in one of my projects to the current versions. This included an update of karma-typescript-es6-transform from version 1.0.2 to 1.0.3. Didn't sound dangorous. But afterwards my tests didn't run by karma any more.

Update 25-Feb-2018: with the latest version 1.0.4 of karma-typescript-es6-transform the error doesn't occur anymore.

I just got:

18 02 2018 11:20:49.774:ERROR [karma]: Error: .../ionic-logging-service/node_modules/ionic-configuration-service/dist/index.js: Couldn't find preset "es2015" relative to directory ".../ionic-logging-service/node_modules/ionic-configuration-service/dist"
Transform function:

Fixing RxJS import problems with Ionic's production build

Recently, I upgraded to Ionic 3.9.x, which included an upgrade to Angular 5.x as well. Everything went smooth, even I did not understand the RXJS stuff in Ionic's change log. But... when I did the first time a production build (ionic build --prod), I got a strange error:

Error: ./node_modules/rxjs/observable/BoundCallbackObservable.js Module build failed: TypeError: Cannot read property 'type' of undefined at Object.getEffectiveTypeAnnotationNode

After googling around, I found 2 solutions: