TypeError: Cannot read property 'createHash' of undefined - ionic-framework

This is an error regarding ionic, I have just upgraded from IONIC 4 to IONIC 5. I have also upgraded my nodejs to latest version 12.16.4. Now I am getting error while performing ionic serve on my ionic projects. Could you please help me out in this regard?

Related

IONIC 5 ionic serve produces Error: NGCC failed

I created a new ionic 5 project by using
ionic start myApp blank
When I run the project in browser using ionic serve it has given the following error
Error: NGCC failed
I figured out the problem my self
The problem was when I was installing the latest npm packages
it was installing the typescript: 4.0.2 and thats why the NGCC error
occured
run the following command and it will work,
npm i typescript#">=3.9.2 <4.0.0”
Or in future some one faces this error this is about the typescript version so just install the valid typescript and you will fix the ngcc error

Adding Cordova to ionic 4 failing

I have been trying to add Cordova to ionic 4 projects but i keep getting an error and I know prior now i was able to add the same but not anymore.
Whenever i run the below command its exiting with error code 1
ionic cordova plugin add cordova-plugin-x-socialsharing
I don't actually know what i am doing wrong or Cordova is no longer working
I have asked in the ionic forum but no response yet
https://forum.ionicframework.com/t/not-able-to-add-cordova-to-ionic-4/177323

Could not find cordova integration in the default project

following the official getting started tutorial I get the following error when I try to deploy the application in my phone using this command: ionic serve --devapp (it works on browser):
[ERROR] Could not find cordova integration in the default project.
I get this error both on Windows and MacOS.
I'm using Node 6.4.1 and Ionic CLI 4.10.3
Does the official tutorial missing something?
I had the same issue. In fact, with the default project, you have to copy the cordova assets to prepare the native build for mobile.
You can find more info here : Ionic documentation
Try this :
ionic cordova prepare
And then go again with :
ionic serve --devapp
The accepted answer is 100% correct .
But the reason why this occurred for me was that somehow the default was capacitor and not cordova.
so first i ran
ionic integrations disable capacitor
then ran
ionic cordova prepare
which solved my issue

Ionic 4 beta doesn't support crashlytics?

I’ve created a new ionic app with ionic version 4.0.0-beta.7 and while adding the Crashlytics plugin, my app is not compiling successfully. Also i cannot see the documentation for crashlytics on https://beta.ionicframework.com/docs/native/. So do ionic 4 beta supports crashlytics or not?
I am getting the following exception in browser console.
Uncaught TypeError: Object(...) is not a function
at index.js:194
at Object../node_modules/#ionic-native/fabric/index.js (index.js:296)
My app is using ionic native 5.0.0.beta-15.
In ionic 4 is all like before (about plugins), just need to append "/ngx" to the path of the wrapper of the plugin. So if the path was "#ionic-native/crashlytics" now it "#ionic-native/crashlytics/ngx"

ionic storage module giving OpaqueToken error with angular 5

I have updated my ionic project to angular 5 and i got the below error with many ionic native plugins..
angular/core/core"' has no exported member 'OpaqueToken
Resolved all of the issues after updating to the latest version , except for ionic-storage.
Still its giving this error
node_modules/#ionic/storage/es2015/storage.d.ts import { OpaqueToken }
from '#angular/core';
node_modules/#angular/core/core"' has no exported member 'OpaqueToken'.
We can see one open issue #github (142) but no fix or workaround found.
You can solve this issue by upgrading #ionic/storage to version 2.1.2 or higher.
Update (context):
OpaqueToken was removed in Angular v5 (it's been deprecated since
Angular v4). The corresponding change in the #ionic/storage package was done in this change as part of the 2.1.2 update.