Hey all
I have recently just upgraded our App to v5 and have started converting our existing animations to the new Ionic Animations.
The original animations was based off the following by Simon from Ionic Academy.
I have been able to update it to the new way of defining animations, but am getting the following error:
Error: Uncaught (in promise): TypeError: animation.beforeAddWrite is not a function
TypeError: animation.beforeAddWrite is not a function
at overlayAnimation (overlays-992cb809.js:149)
at present (overlays-992cb809.js:110)
at Modal.present (ion-modal-md.entry.js:293)
at resolvePromise (zone-evergreen.js:797)
at zone-evergreen.js:707
at rejected (tslib.es6.js:71)
at ZoneDelegate.invoke (zone-evergreen.js:359)
at Object.onInvoke (core.js:39699)
at ZoneDelegate.invoke (zone-evergreen.js:358)
at Zone.run (zone-evergreen.js:124)
at zone-evergreen.js:855
at ZoneDelegate.invokeTask (zone-evergreen.js:391)
at Object.onInvokeTask (core.js:39680)
The beforeAddWrite() method is defined in the animation-interface.d.ts which is part of ionic core (@ionic/core/dist/types/utils/animation/animation-interface.d.ts)
I have been unable to find out why the beforeAddWrite() method is called and where it is called to try and fix the problem. Has anybody encounted this yet and how did you resolve it? Any help would be much appreciated .
My package.json with all the versions that I am using:
{
"name": "mpos",
"version": "0.0.4",
"author": "Ionic Framework",
"homepage": "https://ionicframework.com/",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build --prod",
"build:qa": "ng build --configuration=qa --prod",
"device": "ng build --configuration=qa && npx cap copy android && npx cap sync android && npx cap open android",
"device:prod": "ng build --prod && npx cap copy android && npx cap sync android && npx cap open android"
},
"private": true,
"dependencies": {
"@angular/common": "^8.1.1",
"@angular/core": "^8.1.1",
"@angular/forms": "^8.1.1",
"@angular/platform-browser": "^8.1.1",
"@angular/platform-browser-dynamic": "^8.1.1",
"@angular/router": "^8.1.1",
"@capacitor/android": "^1.1.0",
"@capacitor/cli": "^1.1.0",
"@capacitor/core": "^1.1.0",
"@google/maps": "^0.5.5",
"@ionic-native/android-permissions": "^5.10.0",
"@ionic-native/core": "^5.10.0",
"@ionic-native/navigation-bar": "^5.12.0",
"@ionic/angular": "^5.0.0",
"@ionic/pwa-elements": "^1.3.0",
"angular2-signaturepad": "^2.9.0",
"capacitor-firebase-analytics": "^0.3.2",
"cordova-plugin-android-permissions": "^1.0.0",
"cordova-plugin-navigationbar": "1.0.31",
"cordova-plugin-vectrapebbleplugin": "0.0.5",
"cordova-plugin-vectrascannerplugin": "0.0.7",
"cordova-sunmi-L2-scanner": "git+http://git.italtile.net/artcev/cordova-sunmi-l2-scanner.git#master",
"core-js": "^2.5.4",
"hammerjs": "^2.0.8",
"luxon": "^1.17.1",
"ngx-mask": "^8.0.1",
"rxjs": "~6.5.2",
"text-mask-core": "^5.1.2",
"zone.js": "~0.9.1"
},
"devDependencies": {
"@angular-devkit/architect": "^0.801.1",
"@angular-devkit/build-angular": "^0.801.1",
"@angular-devkit/core": "^8.1.1",
"@angular-devkit/schematics": "^8.1.1",
"@angular/cli": "^8.1.1",
"@angular/compiler": "^8.1.1",
"@angular/compiler-cli": "^8.1.1",
"@angular/language-service": "^8.1.1",
"@ionic/angular-toolkit": "^2.1.2",
"@types/jasmine": "^3.3.13",
"@types/jasminewd2": "~2.0.3",
"@types/node": "^12.6.2",
"codelyzer": "~4.5.0",
"ts-node": "^8.3.0",
"tslint": "^5.18.0",
"typescript": "~3.4.5"
},
"description": "An Ionic project",
"cordova": {
"plugins": {
"cordova-plugin-navigationbar": {}
}
}
}