Open Krassnig opened 1 year ago
@Krassnig Thank you for opening this issue. 🙏 Please check out these other resources that might help you get to a resolution in the meantime:
google-maps
tagThis is an automated message, feel free to ignore.
Hi @Krassnig! Do you have an example-repo where this can be reproduced?
I think I saw that error before and it had something to do with the new moduleResolution: 'bundler'
setting in the tsconfig, is that what you are using?
I think a problem with the proposed solution is that it's not clear which version of the package (umd or esm) the typings are for, but I will have a look into this.
Yes, I have set "moduleResolution": "bundler"
Here is a minimal reproduction of how I got the error: google-maps-imports.zip
Basically I just did a npm create vite
and chose typescript.
Then installed @googlemaps/three
and tried to import import { ThreeJSOverlayView } from '@googlemaps/three';
in src/main.ts
Is your feature request related to a problem? Please describe.
When installing
@googlemaps/three
and importing with typescript viaimport { ThreeJSOverlayView } from '@googlemaps/three';
I get an errorCould not find a declaration file for module '@googlemaps/three'. '.../google-maps-webgl/node_modules/@googlemaps/three/dist/index.esm.js' implicitly has an 'any' type. There are types at '.../google-maps-webgl/node_modules/@googlemaps/three/dist/index.d.ts', but this result could not be resolved when respecting package.json "exports". The '@googlemaps/three' library may need to update its package.json or typings.
Describe the solution you'd like Export the
dist/index.d.ts
as well.package.json before:
package.json after:
Describe alternatives you've considered Making that change manually by editing the dependency inside my
node_modules
folder.