Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ionic error Geolocation ionic Uncaught (in promise): TypeError: Object(…) is not a function TypeError: Object(…) is not a function

While importing Geolocation:

import { Geolocation } from '@ionic-native/geolocation/ngx';

Gettin error:

ionic Geolocation :Ionic v4 Uncaught TypeError: Object(…) is not a function

like image 269
Ranjit Kumar Pandit Avatar asked May 27 '26 15:05

Ranjit Kumar Pandit


1 Answers

this error occured when cordova plugin is not installed you need to install cordova plugin and reserve project

ionic cordova plugin add cordova-plugin-geolocation
npm install @ionic-native/geolocation
like image 194
Chanaka Weerasinghe Avatar answered May 30 '26 03:05

Chanaka Weerasinghe



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!