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

Package doesn't work in Vue #31

Open
gtrusgnich-tempestive opened this issue Mar 12, 2024 · 2 comments
Open

Package doesn't work in Vue #31

gtrusgnich-tempestive opened this issue Mar 12, 2024 · 2 comments

Comments

@gtrusgnich-tempestive
Copy link

I tried to install the library in a Vue project following the guide, but found no way to get it to work. The import via CDN makes it work correctly, but it is not optimal.
Would it be possible to make it work with frameworks other than React?

These are the errors I get in console

image

This is a StackBlitz to reproduce the errors
https://stackblitz.com/edit/vitejs-vite-3viacn?file=src%2Fcomponents%2FHelloWorld.vue

@missinglink
Copy link
Contributor

I had a quick look at this and it doesn't seem to be simple.

I've created a branch for testing which uses useEffect instead of useDeepCompareEffect but wasn't able to get it to load in stackblitz, it seems to be a known issue.

Are you able to try this locally to see if this resolves the errors?

"dependencies": {
    "@geocodeearth/autocomplete-element": "https://github.com/geocodeearth/autocomplete-element#no-deep-effect"
  },

https://github.com/geocodeearth/autocomplete-element/compare/no-deep-effect?expand=1

Other than that, as you mentioned, using the CDN is a workaround.

@gtrusgnich-tempestive
Copy link
Author

I could not get the package to load from the specified repo. It seems to install it correctly, but importing with import import '@geocodeearth/autocomplete-element' gives me error saying I can't find the module.
With version 0.7.0 the import works correctly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants