the Firebase plugin is not installed - ionic 3 - xcode

this is the message I read in the console :
the Firebase plugin is not installed when trying to run my project on a device on Xcode.
I have recently downgraded to Firebase 4.8.0 for dependencies compatibility issues.
I made sure to add my GoogleService-info.plist to the root of my ionic project and to the Xcode project.
I checked my node_modules: #ionic-native/firebase. everything is there
There is no error. The app runs properly, excepts that the Firebase plugin does not seem to be found.
I have tried to uninstall et re-install. no success
What to do in this case?
this is my package.json:
{
"name": "authNotificationTest",
"version": "0.0.1",
"author": "Ionic Framework",
"homepage": "http://ionicframework.com/",
"private": true,
"scripts": {
"clean": "ionic-app-scripts clean",
"build": "ionic-app-scripts build",
"lint": "ionic-app-scripts lint",
"ionic:build": "ionic-app-scripts build",
"ionic:serve": "ionic-app-scripts serve"
},
"dependencies": {
"#angular/animations": "5.2.10",
"#angular/common": "5.2.10",
"#angular/compiler": "5.2.10",
"#angular/compiler-cli": "5.2.10",
"#angular/core": "5.2.10",
"#angular/forms": "5.2.10",
"#angular/http": "5.2.10",
"#angular/platform-browser": "5.2.10",
"#angular/platform-browser-dynamic": "5.2.10",
"#ionic-native/core": "4.7.0",
"#ionic-native/fcm": "^4.7.0",
"#ionic-native/firebase": "^4.7.0",
"#ionic-native/splash-screen": "4.7.0",
"#ionic-native/status-bar": "4.7.0",
"#ionic/storage": "2.1.3",
"angularfire2": "5.0.0-rc.3",
"cordova-browser": "5.0.3",
"cordova-ios": "4.5.4",
"cordova-plugin-device": "^2.0.2",
"cordova-plugin-fcm": "^2.1.2",
"cordova-plugin-fcm-plus": "git+https://github.com/guyromb/cordova-plugin-fcm-plus.git",
"cordova-plugin-firebase": "^1.0.2",
"cordova-plugin-ionic-keyboard": "^2.0.5",
"cordova-plugin-ionic-webview": "^1.2.1",
"cordova-plugin-splashscreen": "^5.0.2",
"cordova-plugin-whitelist": "^1.3.3",
"firebase": "^4.8.0",
"ionic-angular": "3.9.2",
"ionicons": "3.0.0",
"rxjs": "5.5.10",
"sw-toolbox": "3.6.0",
"zone.js": "0.8.26"
},
"devDependencies": {
"#ionic/app-scripts": "3.1.9",
"typescript": "~2.6.2"
},
"description": "An Ionic project",
"cordova": {
"plugins": {
"cordova-plugin-fcm": {},
"cordova-plugin-firebase": {},
"cordova-plugin-whitelist": {},
"cordova-plugin-device": {},
"cordova-plugin-splashscreen": {},
"cordova-plugin-ionic-webview": {},
"cordova-plugin-ionic-keyboard": {}
}
}
}
and, my ionic info:
li packages: (/usr/local/lib/node_modules)
#ionic/cli-utils : 1.19.2
ionic (Ionic CLI) : 3.20.0
global packages:
cordova (Cordova CLI) : 8.0.0
local packages:
#ionic/app-scripts : 3.1.9
Cordova Platforms : browser 5.0.3 ios 4.5.4
Ionic Framework : ionic-angular 3.9.2
System:
Node : v9.11.1
npm : 6.0.0
OS : macOS High Sierra
Xcode : Xcode 9.3 Build version 9E145
Environment Variables:
ANDROID_HOME : not set
Misc:
backend : pro

Try to run:-
ionic cordova plugin add cordova-plugin-firebase
npm install --save #ionic-native/firebase
For more info visit:- https://ionicframework.com/docs/native/firebase/

Related

Cannot find module "d3" error is displayed after i upgraded my project from ionic 2 to ionic 3

I just upgraded my from ionic 2 to ionic 3. but now it is stuck at splash screen with error:
Cannot find module "d3"
here is my ionic info :
Cordova CLI: 6.4.0
Ionic Framework Version: 3.0.1
Ionic CLI Version: 2.2.1
Ionic App Lib Version: 2.2.0
Ionic App Scripts Version: 1.3.0
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 10
Node Version: v6.9.1
Xcode version: Not installed
Package.json
{
"name": "MyApp",
"author": "",
"homepage": "http://ionicframework.com/",
"private": true,
"scripts": {
"clean": "ionic-app-scripts clean",
"build": "ionic-app-scripts build",
"ionic:build": "ionic-app-scripts build",
"ionic:serve": "ionic-app-scripts serve"
},
"dependencies": {
//dependencies starts here. have updated these according to ionic 3
"#angular/common": "4.0.0",
"#angular/compiler": "4.0.0",
"#angular/compiler-cli": "4.0.0",
"#angular/core": "4.0.0",
"#angular/forms": "4.0.0",
"#angular/http": "4.0.0",
"#angular/platform-browser": "4.0.0",
"#angular/platform-browser-dynamic": "4.0.0",
"#angular/platform-server": "2.2.1",
"#ionic-native/core": "^3.10.3",
"#ionic-native/keyboard": "^3.4.4",
"#ionic-native/splash-screen": "3.4.2",
"#ionic-native/status-bar": "3.4.2",
"#ionic/cloud-angular": "^0.10.0",
"#ionic/storage": "2.0.1",
"angular2-moment": "^1.1.0",
"google-libphonenumber": "^2.0.14",
"ionic-angular": "3.0.1",
"ionic-gallery-modal": "0.0.7",
"ionic-native": "2.2.11",
"ionicons": "3.0.0",
"rxjs": "5.1.1",
"sw-toolbox": "3.4.0",
"zone.js": "^0.8.4"
},
"devDependencies": {
"#ionic/app-scripts": "1.3.0",
"#ionic/cli-plugin-cordova": "1.1.2",
"#ionic/cli-plugin-ionic-angular": "1.1.2",
"typescript": "2.1"
},
"cordovaPlugins": [
"ionic-plugin-keyboard",
"cordova-plugin-whitelist",
"cordova-plugin-console",
"cordova-plugin-statusbar",
"cordova-plugin-device",
"cordova-plugin-splashscreen",
"cordova-sqlite-storage",
"cordova-plugin-x-toast",
"cordova-plugin-camera",
"cordova-plugin-compat",
"cordova-plugin-image-picker",
"cordova.plugins.diagnostic",
{
"id": "phonegap-plugin-push",
"locator": "phonegap-plugin-push",
"variables": {
"SENDER_ID": "XXXXXXXXXXX"
}
},
"cordova-plugin-appavailability",
"ionic-plugin-deploy",
"cordova-plugin-x-socialsharing",
"cordova-plugin-screen-orientation",
"com.hutchind.cordova.plugins.streamingmedia",
"cordova-plugin-contacts",
"ionic-plugin-deploy",
"cordova-plugin-x-socialsharing",
{
"locator": "https://github.com/napolitano/cordova-plugin-intent",
"id": "com.napolitano.cordova.plugin.intent"
},
"cordova-plugin-screen-orientation",
"cordova-plugin-file",
"cordova-plugin-file-transfer"
],
"cordovaPlatforms": [
{
"platform": "android",
"version": "",
"locator": "android"
}
],
"description": "An Ionic project"
}
Followed this link for the upgrade
Install d3 to package.json.
npm install d3 --save
Install the type declarations from npm:
npm install #types/d3 --save-dev
You dont need typings. It is deprecated.
The same for jquery.
used following set of commands to solve:
npm install d3#vSpecify_your_version --save
npm install -g typings --save
typings search d3 --save
typings install d3 --save
npm install jquery --save
typings install dt~jquery --global --save
npm install aws-sdk --save
Then delete the node_modules folder of your project and do npm install in your projects CMD/Terminal.

VS2015: "Cannot find type definition" and "File not found" errors

I have an Angular2 app which worked perfectly fine until two days ago. When I tried to build the solution in Visual Studio 2015, I got 10 errors:
Build: Cannot find type definition file for 'hammerjs'.
Build: Cannot find type definition file for 'jasmine'.
Build: File (...)/wwwroot/lib/ng2-translate/index.ts' not found.
And 6 more about various files in ng2-translate not found.
Surprisingly, when I build my app by dotnet run command, it works well.
I updated everything by npm-check-updates -u, but it didn't change anything.
My package.json:
{
"version": "1.0.0",
"name": "CarMarket",
"private": true,
"dependencies": {
"#angular/common": "~4.0.3",
"#angular/compiler": "~4.0.3",
"#angular/core": "~4.0.3",
"#angular/forms": "~4.0.3",
"#angular/http": "~4.0.3",
"#angular/platform-browser": "~4.0.3",
"#angular/platform-browser-dynamic": "~4.0.3",
"#angular/router": "~4.0.3",
"#angular/upgrade": "~4.0.3",
"angular-in-memory-web-api": "~0.3.1",
"body-parser": "1.17.1",
"bootstrap": "3.3.7",
"chart.js": "^2.5.0",
"core-js": "^2.4.1",
"es6-shim": "^0.35.0",
"fancybox": "3.0.0",
"jquery": "3.2.1",
"ng2-charts": "^1.5.0",
"ng2-translate": "^5.0.0",
"reflect-metadata": "^0.1.8",
"rxjs": "5.3.0",
"systemjs": "0.20.12",
"zone.js": "^0.8.9"
},
"devDependencies": {
"#types/node": "^7.0.13",
"del": "2.2.2",
"gulp": "3.9.1",
"gulp-typescript": "3.1.6",
"gulp-watch": "4.3.11",
"merge": "1.2.0",
"typescript": "^2.0.10",
"typings": "^2.1.1"
},
"scripts": {
"postinstall": "typings install"
}
}
What might be the reason of those errors? H
As the error clearly states, you are missing type definitions for hammerjs and jasmine. You can either add them to your typings definition file, or you can install the types packages directly:
npm install --save #types/hammerjs
npm install --save #types/jasmine

Push Ionic2 to heroku : Cannot get /

I'm trying to push my ionic2 project (as a web-app) to Heroku, the deploy is ok, but when I'm accessing to the app, I have a blank page with a "Cannot GET /".
I have an express server, a correct Procfile, but I think the www/ is not build on deploy. Effectively, if I include my www/ folder in my push, the web-app run... (But i don't want versionning my www/ folder).
Here, my package.json. What i'm doing wrong ? Thank you !
{
"name": "ionic-hello-world",
"author": "Ionic Framework",
"homepage": "http://ionicframework.com/",
"private": true,
"main": "server.js",
"scripts": {
"clean": "ionic-app-scripts clean",
"build": "ionic-app-scripts build",
"ionic:build": "ionic-app-scripts build",
"ionic:serve": "ionic-app-scripts serve",
"start": "node server.js"
},
"dependencies": {
"#angular/common": "2.2.1",
"#angular/compiler": "2.2.1",
"#angular/compiler-cli": "2.2.1",
"#angular/core": "2.2.1",
"#angular/forms": "2.2.1",
"#angular/http": "2.2.1",
"#angular/platform-browser": "2.2.1",
"#angular/platform-browser-dynamic": "2.2.1",
"#angular/platform-server": "2.2.1",
"#ionic/storage": "1.1.6",
"angular2-jwt": "^0.1.27",
"auth0-lock": "^10.7.3",
"express": "^4.14.1",
"ionic-angular": "2.0.0-rc.4",
"ionic-native": "2.2.11",
"ionicons": "3.0.0",
"rxjs": "5.0.0-beta.12",
"zone.js": "0.6.26"
},
"devDependencies": {
"#ionic/app-scripts": "^1.0.0",
"typescript": "2.0.9",
"sw-toolbox": "3.4.0"
},
"cordovaPlugins": [
"cordova-plugin-whitelist",
"cordova-plugin-statusbar",
"cordova-plugin-console",
"cordova-plugin-device",
"cordova-plugin-splashscreen",
"ionic-plugin-keyboard"
],
"cordovaPlatforms": [],
"description": "deals: An Ionic project"
}

How do I utilize the Parse push plugin in an Ionic 2 app?

I'm trying to use the Parse push plugin with my Ionic 2 app from: https://github.com/taivo/parse-push-plugin.
Once downloaded it says that it's ready to use anywhere in my code with the ParsePushPlugin name space. When I try to use it without importing it throws the error:
Cannot find name 'ParsePushPlugin'.
Upon doing either of the following in the terminal:
cordova plugin add https://github.com/taivo/parse-push-plugin
OR
ionic plugin add https://github.com/taivo/parse-push-plugin
The result is deposited in my 'plugins' directory. This is not part of Ionic native so I can't just import from Ionic Native. I have also tried importing it from the plugins directory using the ParsePushPlugin name space both with and without curly brackets but that does not working either. Where am I going wrong?
UPDATE
I updated my package.json based on an inquiry and as of this package.json along with a full re-start the app still says that cordova is not defined.
{
"name": "ionic-hello-world",
"author": "Ionic Framework",
"homepage": "http://ionicframework.com/",
"private": true,
"scripts": {
"ionic:build": "ionic-app-scripts build",
"ionic:serve": "ionic-app-scripts serve"
},
"dependencies": {
"#angular/common": "2.1.1",
"#angular/compiler": "2.1.1",
"#angular/compiler-cli": "2.1.1",
"#angular/core": "2.1.1",
"#angular/forms": "2.1.1",
"#angular/http": "2.1.1",
"#angular/platform-browser": "2.1.1",
"#angular/platform-browser-dynamic": "2.1.1",
"#angular/platform-server": "2.1.1",
"#ionic/storage": "1.1.6",
"#types/parse": "^1.2.32",
"ionic-angular": "2.0.0-rc.3",
"ionic-native": "2.2.3",
"ionicons": "3.0.0",
"rxjs": "5.0.0-beta.12",
"underscore": "^1.8.3",
"moment": "2.10.3",
"sweetalert": "1.1.3",
"zone.js": "0.6.26"
},
"devDependencies": {
"#ionic/app-scripts": "0.0.45",
"typescript": "2.0.6"
},
"cordovaPlugins": [
"cordova-plugin-device",
"cordova-plugin-console",
"cordova-plugin-whitelist",
"cordova-plugin-splashscreen",
"cordova-plugin-statusbar",
"ionic-plugin-keyboard",
"cordova-plugin-facebook4",
"cordova-plugin-nativestorage",
"parse-push-plugin"
],
"cordovaPlatforms": [
"ios",
{
"platform": "ios",
"version": "",
"locator": "ios"
}
],
"description": "CPM: An Ionic project"
}
set
declare var cordova:any;
and use like this:
platform.ready().then(
() => {
console.log("MyApp::constructor platform.ready");
cordova.plugins.ParsePushPlugin.// settings and methods.
}
);
Check this answer
Note: Cordova plugins do not work with ionic serve as they are not loaded to the browser. You will need to test in a phone.
To be 100% clear. In order to use the Taivo Parse Push Plugin library with Ionic2/Angular2:
1) Download the library from github.
git clone https://github.com/taivo/parse-push-plugin
2) You do not import this library like you do things from ionic/native or node_module libraries. In any component that you would like to use it simply do this below your imports in the given ts file:
declare var ParsePushPlugin: any;
From here you are ready to go and ParsePushPlugin has all of the capabilities outlined in the docs.

NativeScript build failed. Error - actual and formal argument lists differ in length

Recently I've updated my NativeScript CLI to 2.1.0 & installed Telerik UI plugin. After that. my app build getting fail with the error "actual and formal argument lists differ in length".
Screenshot -
package.json
{
"description": "NativeScript Application",
"license": "SEE LICENSE IN <your-license-filename>",
"readme": "NativeScript Application",
"repository": "<fill-your-repository-here>",
"nativescript": {
"id": "org.nativescript.bhramaan",
"tns-android": {
"version": "2.1.1"
}
},
"dependencies": {
"#angular/common": "2.0.0-rc.1",
"#angular/compiler": "2.0.0-rc.1",
"#angular/core": "2.0.0-rc.1",
"#angular/http": "2.0.0-rc.1",
"#angular/platform-browser": "2.0.0-rc.1",
"#angular/platform-browser-dynamic": "2.0.0-rc.1",
"#angular/platform-server": "2.0.0-rc.1",
"#angular/router-deprecated": "2.0.0-rc.1",
"nativescript-angular": "0.1.1",
"nativescript-plugin-firebase": "^3.0.1",
"tns-core-modules": "^2.0.0"
},
"devDependencies": {
"babel-traverse": "6.9.0",
"babel-types": "6.9.0",
"babylon": "6.8.0",
"filewalker": "0.1.2",
"lazy": "1.0.11",
"nativescript-dev-typescript": "^0.3.2",
"typescript": "^1.8.10"
}
}
I've also removed platform & added once again. But, still now no luck.
Here is your problem:
"tns-android": {
"version": "2.1.1"
}
"tns-core-modules": "^2.0.0"
You must have TNS/NativeScript-CLI, TNS-Common-Core and the TNS-Platforms the same version.
Type: tns info to easily see what versions you are.
Here are the upgrade steps:
To upgrade NativeScript command line
npm install -g nativescript#latest
To Upgrade the NativeScript Common Core library
npm install tns-core-modules#latest --save
To Upgrade the platform (replace android with ios for iOS)
tns platform remove android
tns platform add android

Resources