Error on : Object(...) is not a function at Deeplinks.route

Error on deep links , (ionic 3).

Code:

constructor(platform: Platform, statusBar: StatusBar, splashScreen: SplashScreen, private deeplinks: Deeplinks) {


platform.ready().then(() => {
  // Okay, so the platform is ready and our plugins are available.
  // Here you can do any higher level native things you might need.
  statusBar.styleDefault();
  splashScreen.hide();



  this.deeplinks.route({
      '/': {},
      '/reset-password/:Id': MmresetpasswordPage
    })
    .subscribe(match => {
      alert(JSON.stringify(match));
    }, nomatch => {
      alert(JSON.stringify(nomatch));

    });

});

Anyone, any clues, any help, plz?

Thx in advance!

1 Like

The same question here.
Any solution on the problem?

Hit the same issue here myself. Anyone come up with a solution yet?

The same question here
No solution ? How can I retrieve a parameter from deeplink ?

hello any solution about this?! i have the same problem!

Hello,
I have the same problem. For me, it was a version problem.

Check your project type in ionic.config.json file.

If the type is " ionic-angular ", then install 4.x.x version.

Anyone fixed this issue ?

This isn’t really a general “issue” that “anyone” could fix, so nobody is likely to be able to tell you anything useful for your situation given just what you’ve said so far. This thread refers to an (obsolete, I believe) old product that had a specific way of handling dependencies, which is relevant to the topic.

The most helpful information you could provide is your package.json.

{
“name”: “qc-hybrid”,
“version”: “0.0.1”,
“author”: “Ionic Framework”,
“homepage”: “https://ionicframework.com/”,
“scripts”: {
“ng”: “ng”,
“start”: “ng serve”,
“build”: “ng build”,
“test”: “ng test”,
“lint”: “ng lint”,
“e2e”: “ng e2e”
},
“private”: true,
“dependencies”: {
@angular/animations”: “^8.2.14”,
@angular/common”: “^7.2.2”,
@angular/core”: “^7.2.2”,
@angular/fire”: “^5.1.1”,
@angular/forms”: “^7.2.2”,
@angular/platform-browser”: “^7.2.2”,
@angular/platform-browser-dynamic”: “^7.2.2”,
@angular/router”: “^7.2.2”,
@fortawesome/angular-fontawesome”: “0.3.0”,
@fortawesome/fontawesome-svg-core”: “1.2.17”,
@fortawesome/free-solid-svg-icons”: “5.8.1”,
@ionic-native/core”: “^5.0.0”,
@ionic-native/deeplinks”: “^4.20.0”,
@ionic-native/fcm”: “^5.18.0”,
@ionic-native/screen-orientation”: “^5.18.0”,
@ionic-native/splash-screen”: “^5.0.0”,
@ionic-native/status-bar”: “^5.0.0”,
@ionic/angular”: “^4.7.1”,
@sweetalert2/ngx-sweetalert2”: “^5.1.0”,
“bootstrap”: “^4.4.1”,
“cordova-android”: “8.1.0”,
“cordova-ios”: “~4.3.1”,
“cordova-plugin-fcm-with-dependecy-updated”: “4.1.1”,
“cordova-plugin-screen-orientation”: “3.0.2”,
“core-js”: “^2.5.4”,
“dashjs”: “^3.0.0”,
“es6-promise-plugin”: “4.2.2”,
“firebase”: “^5.8.2”,
“intersection-observer”: “^0.5.0”,
“ionic-plugin-deeplinks”: “^1.0.20”,
“mediaelement”: “^4.2.10”,
“moment”: “^2.24.0”,
“net”: “^1.0.2”,
“ngx-toastr”: “10.1.0”,
“ngx-webstorage”: “^2.0.1”,
“process”: “^0.11.10”,
“rxjs”: “~6.3.3”,
“rxjs-compat”: “6.3.3”,
“sockjs-client”: “^1.3.0”,
“stompjs”: “^2.3.3”,
“sweetalert2”: “^8.0.0”,
“tslib”: “^1.9.0”,
“zone.js”: “~0.9.1”
},
“devDependencies”: {
@angular-devkit/architect”: “~0.12.3”,
@angular-devkit/build-angular”: “~0.12.3”,
@angular-devkit/core”: “~7.2.3”,
@angular-devkit/schematics”: “~7.2.3”,
@angular/cli”: “~7.2.2”,
@angular/compiler”: “~7.2.2”,
@angular/compiler-cli”: “~7.2.2”,
@angular/language-service”: “~7.2.2”,
@ionic/angular-toolkit”: “~1.5.1”,
@ionic/lab”: “^2.0.17”,
@types/jasmine”: “~3.3.8”,
@types/jasminewd2”: “~2.0.3”,
@types/node”: “~8.9.4”,
“codelyzer”: “^5.0.0”,
“jasmine-core”: “~3.4.0”,
“jasmine-spec-reporter”: “~4.2.1”,
“karma”: “~4.1.0”,
“karma-chrome-launcher”: “~2.2.0”,
“karma-coverage-istanbul-reporter”: “~2.0.1”,
“karma-jasmine”: “~2.0.1”,
“karma-jasmine-html-reporter”: “^1.4.0”,
“protractor”: “~5.4.0”,
“ts-node”: “~7.0.0”,
“tslint”: “~5.15.0”,
“typescript”: “~3.2.0”,
“cordova-plugin-whitelist”: “1.3.3”,
“cordova-plugin-statusbar”: “2.4.2”,
“cordova-plugin-device”: “2.0.2”,
“cordova-plugin-splashscreen”: “5.0.2”,
“cordova-plugin-ionic-webview”: “^4.0.0”,
“cordova-plugin-ionic-keyboard”: “^2.0.5”
},
“description”: “An Ionic project”,
“cordova”: {
“platforms”: [
“ios”,
“android”
],
“plugins”: {
“cordova-plugin-whitelist”: {},
“cordova-plugin-statusbar”: {},
“cordova-plugin-device”: {},
“cordova-plugin-splashscreen”: {},
“cordova-plugin-ionic-webview”: {},
“cordova-plugin-ionic-keyboard”: {},
“cordova-plugin-fcm-with-dependecy-updated”: {
“FCM_CORE_VERSION”: “16.0.9”,
“FCM_VERSION”: “18.0.0”,
“GRADLE_TOOLS_VERSION”: “3.5.0”,
“GOOGLE_SERVICES_VERSION”: “4.2.0”
},
“cordova-plugin-screen-orientation”: {},
“ionic-plugin-deeplinks”: {
“URL_SCHEME”: “ndis”,
“DEEPLINK_SCHEME”: “https”,
“DEEPLINK_HOST”: “ndis.in”,
“ANDROID_PATH_PREFIX”: “/”,
“ANDROID_2_PATH_PREFIX”: “/”,
“ANDROID_3_PATH_PREFIX”: “/”,
“ANDROID_4_PATH_PREFIX”: “/”,
“ANDROID_5_PATH_PREFIX”: “/”,
“DEEPLINK_2_SCHEME”: " ",
“DEEPLINK_2_HOST”: " ",
“DEEPLINK_3_SCHEME”: " ",
“DEEPLINK_3_HOST”: " ",
“DEEPLINK_4_SCHEME”: " ",
“DEEPLINK_4_HOST”: " ",
“DEEPLINK_5_SCHEME”: " ",
“DEEPLINK_5_HOST”: " "
}
}
}
}

this is my package.json

Here’s your problem. All @ionic-native parts must be on the same major version.

Have have you fixed your problem please?

I am having ionic version 3 and angular 5, still facing the same issues. Is anyone who come through the solution in deeplinks?

I got the solution now
You just need to install the plugin and then goto your project directory and run npm intall commant.
Please ignore to install the following : ```
npm install --save @ionic-native/deeplinks@4

in you package.json check : “@ionic-native/core”: “4.20.0”,
@ionic-native/deeplinks”: “^4.20.0”,

It should be the same version