Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation problem: Property 'MarkerOptions' does not exist on type 'typeof maps'' #6253

Closed
1 task done
Annoxis opened this issue Jun 27, 2024 · 8 comments · Fixed by #6319
Closed
1 task done
Labels
triage Issues to be categorized by the team

Comments

@Annoxis
Copy link

Annoxis commented Jun 27, 2024

🐛 Current behavior

I get the following error at instantsearch.js/es/widgets/geo-search/geo-search.d.ts:213:63 : Property 'MarkerOptions' does not exist on type 'typeof maps'.
Here is the faulty line of code: markerOptions: GeoSearchMarker<typeof google.maps.MarkerOptions | Partial<HTMLMarkerArguments>>;

Removing "typeof" fixes the issue as a workaround for development, but it won't be applicable in production.

🔍 Steps to reproduce

Simply download the relevant libraries, start a basic angular project and attempt to launch the front end.
I am sorry, I have not been able to run the codesandbox online, but it worked locally.

Live reproduction

https://codesandbox.io/p/github/Annoxis/instantsearch_googlemaps_import_problem/main

💭 Expected behavior

My front end compile.

Package version

Instantsearch.js 4.72.2, types/google.maps 3.55.10, angular 15.2, npm 10.5.0

Operating system

Tested under Mac Sonoma and Windows 11 (WSL 2)

Browser

Irrelevant

Code of Conduct

  • I agree to follow this project's Code of Conduct
@Annoxis Annoxis added the triage Issues to be categorized by the team label Jun 27, 2024
@Haroenv
Copy link
Contributor

Haroenv commented Jun 27, 2024

Your sandbox seems to be private, but I tried to reproduce and I don't see an error: https://codesandbox.io/p/sandbox/friendly-ben-jzt2xs?file=%2Fsearch.ts%3A100%2C1-111%2C6

@Annoxis
Copy link
Author

Annoxis commented Jun 28, 2024

@Haroenv I updated the codesandbox, it should work now. The main difference between our codes is that I am using Angular and you are not.

@KennethHoff
Copy link

I can attest to this. It does not compile for me either.

@antoniobuyukluev
Copy link

Same on my end

@Haroenv
Copy link
Contributor

Haroenv commented Aug 7, 2024

I wonder if this is caused by somehow you having both @types/googlemaps and @types/google.maps installed. Can you check that? And if removing one of the two manually works

@antoniobuyukluev
Copy link

antoniobuyukluev commented Aug 7, 2024

I wonder if this is caused by somehow you having both @types/googlemaps and @types/google.maps installed. Can you check that? And if removing one of the two manually works

image
i have only one type
removing both from the photo is not fixing it

my local workaround is to comment it
image
but if remove the typeof
image
or remove the MarkerOptions
image

it compiles

@antoniobuyukluev
Copy link

@Haroenv
image
i think this is the reason

Haroenv added a commit that referenced this issue Aug 8, 2024
This isn't really exposed to the user, but I believe this broke when they moved from a namespace to an interface.

fixes #6253
@Haroenv
Copy link
Contributor

Haroenv commented Aug 8, 2024

Thanks, I believe the changes in #6319 will fix the issue then. Do you mind using the version that codesandbox will provide in the PR locally and see if that all works? thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage Issues to be categorized by the team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants