I want to include Google Maps in an ionic capacitor angular project so I followed the official documentation to do so. But when I serve or run the application I get the following error:
Error: node_modules/@capacitor/google-maps/dist/typings/definitions.d.ts:1:23 - error TS2688: Cannot find type definition file for 'google.maps'.
[ng] 1 /// <reference types="google.maps" />
I searched everywhere, checked the documentation, even followed the answers in this stack overflow question none which seemed to help:
If you’re trying to use Google Maps and it’s not working, there could be a few different reasons. You may have a weak or insecure internet connection. If you’re using a cellular data connection, try moving to a different location or using a Wi-Fi connection.
Google Maps issues
Second, check to see if there are any outages in your area. Google Maps relies on real-time data, so if there’s an issue with the servers, it can affect the service. You can check outages on the Google Maps website or the Google Status Dashboard.
If you’re still having trouble, it could be a problem with your device, cache memory, or the Google Maps application itself. If there’s trouble with a specific feature, like navigation or search, you can check the Google Maps Help Center for more information.
Regards,
Rachel Gomez
That wasn’t what I had an issue with, my problem is that the application is not serving or running anymore. I wanted to add google maps to the app so I followed the documentation and after I installed the required @capacitor/google-maps package the application no longer served. Neither “ionic serve -l” nor “ionic cap run android --external” work, they give the same error for the package.
Looks like it’s a bug on latest release.
Would be good if somebody could provide a sample app where the issue can be reproduced
1 Like