Hi, I’m trying to migrate my Ionic 3 project into Ionic 4 beta and have runned on a problem with cordova not being able to be exported correctly.
This is my package.json dependencies:
“dependencies”: {
“@angular/common”: “6.0.9”,
“@angular/core”: “6.0.9”,
“@angular/forms”: “6.0.9”,
“@angular/http”: “6.0.9”,
“@angular/platform-browser”: “6.0.9”,
“@angular/platform-browser-dynamic”: “6.0.9”,
“@angular/router”: “6.0.9”,
“@ionic-native/barcode-scanner”: “^4.10.1”,
“@ionic-native/core”: “^4.10.1”,
“@ionic-native/facebook”: “^4.10.1”,
“@ionic-native/geolocation”: “^4.10.1”,
“@ionic-native/google-maps”: “^4.9.1”,
“@ionic-native/social-sharing”: “^4.10.1”,
“@ionic-native/splash-screen”: “5.0.0-beta.14”,
“@ionic-native/status-bar”: “5.0.0-beta.14”,
“@ionic/angular”: “4.0.0-beta.0”,
“@ionic/ng-toolkit”: “1.0.0”,
“@ionic/schematics-angular”: “1.0.0”,
“@ionic/storage”: “^2.1.3”,
“cordova-android”: “6.3.0”,
“cordova-plugin-device”: “^2.0.2”,
“cordova-plugin-facebook4”: “^2.2.0”,
“cordova-plugin-geolocation”: “^4.0.1”,
“cordova-plugin-googlemaps”: “^2.3.8”,
“cordova-plugin-ionic-keyboard”: “^2.1.2”,
“cordova-plugin-ionic-webview”: “^2.0.1”,
“cordova-plugin-nativestorage”: “^2.3.2”,
“cordova-plugin-splashscreen”: “^5.0.2”,
“cordova-plugin-whitelist”: “^1.3.3”,
“cordova-plugin-x-socialsharing”: “^5.4.1”,
“cordova-sqlite-storage”: “^2.3.3”,
“core-js”: “^2.5.3”,
“crypto-js”: “^3.1.9-1”,
“es6-promise-plugin”: “^4.2.2”,
“minimist”: “^1.2.0”,
“phonegap-plugin-barcodescanner”: “^8.0.0”,
“rxjs”: “6.2.2”,
“rxjs-compat”: “^6.2.2”,
“xml2js”: “^0.4.19”,
“zone.js”: “^0.8.26”
},
And this is my Ionic Info:
Ionic:
ionic (Ionic CLI) : 4.0.0 (C:\Users\Sam\AppData\Roaming\npm\node_modules\ionic)
Ionic Framework : @ionic/angular 4.0.0-beta.0
@angular-devkit/core : 0.7.0-rc.3
@angular-devkit/schematics : 0.7.0-rc.3
@angular/cli : 6.0.8
@ionic/ng-toolkit : 1.0.0
@ionic/schematics-angular : 1.0.0Cordova:
cordova (Cordova CLI) : 7.1.0
Cordova Platforms : android 6.3.0System:
NodeJS : v8.11.2 (C:\Program Files\nodejs\node.exe)
npm : 5.6.0
OS : Windows 10
And this is a list of warnings I’m getting while running ionic serve, the application works on my computer, but I guess the warnings have something to do with it.
> client?719c:148 [WDS] Warnings while compiling.
> client?719c:154 ./node_modules/@ionic-native/splash-screen/ngx/index.js
> 24:55-62 "export 'cordova' was not found in '@ionic-native/core'
> client?719c:154 ./node_modules/@ionic-native/status-bar/ngx/index.js
> 24:74-81 "export 'cordova' was not found in '@ionic-native/core'
> client?719c:154 ./node_modules/@ionic-native/splash-screen/ngx/index.js
> 25:55-62 "export 'cordova' was not found in '@ionic-native/core'
> client?719c:154 ./node_modules/@ionic-native/status-bar/ngx/index.js
> 25:60-67 "export 'cordova' was not found in '@ionic-native/core'
> client?719c:154 ./node_modules/@ionic-native/status-bar/ngx/index.js
> 26:65-72 "export 'cordova' was not found in '@ionic-native/core'
> client?719c:154 ./node_modules/@ionic-native/status-bar/ngx/index.js
> 27:69-76 "export 'cordova' was not found in '@ionic-native/core'
> client?719c:154 ./node_modules/@ionic-native/status-bar/ngx/index.js
> 28:64-71 "export 'cordova' was not found in '@ionic-native/core'
> client?719c:154 ./node_modules/@ionic-native/status-bar/ngx/index.js
> 29:78-85 "export 'cordova' was not found in '@ionic-native/core'
> client?719c:154 ./node_modules/@ionic-native/status-bar/ngx/index.js
> 30:83-90 "export 'cordova' was not found in '@ionic-native/core'
> client?719c:154 ./node_modules/@ionic-native/status-bar/ngx/index.js
> 31:52-59 "export 'cordova' was not found in '@ionic-native/core'
> client?719c:154 ./node_modules/@ionic-native/status-bar/ngx/index.js
> 32:52-59 "export 'cordova' was not found in '@ionic-native/core'
> client?719c:154 ./node_modules/@ionic-native/status-bar/ngx/index.js
> 34:34-52 "export 'cordovaPropertyGet' was not found in '@ionic-native/core'
> client?719c:154 ./node_modules/@ionic-native/status-bar/ngx/index.js
> 35:32-50 "export 'cordovaPropertySet' was not found in '@ionic-native/core'
And at last running ionic cordova run android --device produce a functional build and the app being launched on my phone but only results in a frozen white screen. And this is the output it gives me through the console:
runtime.js:1 Failed to load resource: net::ERR_FILE_NOT_FOUND
cordova.js:1 Failed to load resource: net::ERR_FILE_NOT_FOUND
vendor.js:1 Failed to load resource: net::ERR_FILE_NOT_FOUND
main.js:1 Failed to load resource: net::ERR_FILE_NOT_FOUND
styles.js:1 Failed to load resource: net::ERR_FILE_NOT_FOUND
polyfills.js:1 Failed to load resource: net::ERR_FILE_NOT_FOUND
/assets/icon/favicon.png:1 Failed to load resource: net::ERR_FILE_NOT_FOUND
Anyone else got the same type of error while migrating to Ionic 4 beta?