ERROR in node_modules/@types/googlemaps/index.d.ts -- A tuple type element list cannot be empty
You need to go back to a version that works.
In your package.json
file, choose an older version specifically:
...
"@types/googlemaps" : "3.26.15"
...
I am getting the same error as defined above. but when I go to file in nodemodules/@types/GoogleMaps and open file index.d.ts. I see lot of functions there as shown in fig. for example we have a function bounds_changed: []; when I changed this function to bounds_changed:[''] it is working fine but we need an exact solution how to fix this because we are installing node modules every time when we create a build.
interface MapHandlerMap { /** * This event is fired when the viewport bounds have changed. * @see {@link https://developers.google.com/maps/documentation/javascript/reference/map#Map.bounds_changed Maps JavaScript API} * @see {@link Map#getBounds} * @see {@link Map#fitBounds} * @see {@link Map#panToBounds} */ bounds_changed: [];
/**
* This event is fired when the map center property changes.
* @see {@link https://developers.google.com/maps/documentation/javascript/reference/map#Map.center_changed Maps JavaScript API}
* @see {@link MapOptions#center}
* @see {@link Map#getCenter}
* @see {@link Map#setCenter}
*/
center_changed: [];
downgrade your version of googlemapps https://www.npmjs.com/package/@types/googlemaps/v/3.38.0
run the command npm i @types/[email protected]