dpa99c / phonegap-launch-navigator

Phonegap/Cordova plugin which launches native route navigation apps for Android, iOS and Windows
369 stars 129 forks source link

Cannot read properties of undefined (reading 'actionsheet') #275

Closed hitmacreed closed 1 year ago

hitmacreed commented 1 year ago

Bug report

CHECKLIST

Current behavior: Msg: Unhandled Promise rejection: Cannot read properties of undefined (reading 'actionsheet') ; Zone: <root> ; Task: Promise.then ; Value: TypeError: Cannot read properties of undefined (reading 'actionsheet') TypeError: Cannot read properties of undefined (reading 'actionsheet')

Expected behavior: Launch the navigator

Steps to reproduce:

import { LaunchNavigator, LaunchNavigatorOptions } from '@awesome-cordova-plugins/launch-navigator/ngx';

constructor(private launchNavigator: LaunchNavigator) { }

let options: LaunchNavigatorOptions = {
  start: 'London, ON',
  app: LaunchNavigator.APPS.UBER
}

this.launchNavigator.navigate('Toronto, ON', options)
  .then(
    success => console.log('Launched navigator'),
    error => console.log('Error launching navigator', error)
  );

Screenshots

Screenshot 2022-07-22 at 10 36 10

Environment information Capacitor

Runtime issue

dpa99c commented 1 year ago

This plugin depends on cordova-plugin-actionsheet which appears to be missing from your project.

Please use the example project to validate plugin functionality before reporting bugs to eliminate problems that are specific to your project.

If you are able to reproduce a bug in the known codebase of the example project, please provide the list of steps required to reproduce it.

hitmacreed commented 1 year ago

Hi thanks for the answer, this fixed the problem

npm i cordova-plugin-dialogs
npm install @awesome-cordova-plugins/dialogs 

npm i cordova-plugin-actionsheet
npm install @awesome-cordova-plugins/action-sheet 

ionic cap sync