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

Not working on Nuxt 3 #33

Open
likymm opened this issue Dec 19, 2022 · 7 comments
Open

Not working on Nuxt 3 #33

likymm opened this issue Dec 19, 2022 · 7 comments
Assignees
Labels
bug Something isn't working help wanted You can contribute with this with in any way possible

Comments

@likymm
Copy link

likymm commented Dec 19, 2022

Please help, I'm supper new to Vue and Nuxt 3.

I'm currently using @fawmi/vue-google-maps and since lack of support, I want to use this library. But, I'm getting an error when using it on Nuxt 3.

nuxt: ^3.0.0
vue-google-maps-community-fork: ^0.1.6

I also got this error on @fawmi/vue-google-maps but at least I have these work around by pinning this version "@fawmi/vue-google-maps": "0.9.72",

I'm not getting error but I only see white screen,

Also, based on Nuxt 3 Plugins Directory Guide, I placed my plugin in /plugins not /plugin opposed to the example in this docs for Nuxt 3.

Thanks in advance.

@NathanAP
Copy link
Owner

Hello! Sorry for the delay on answering.

Can this be related to our Vite 4 problem @websitevirtuoso ?

@NathanAP NathanAP self-assigned this Dec 20, 2022
@NathanAP NathanAP added bug Something isn't working help wanted You can contribute with this with in any way possible labels Dec 20, 2022
@larrasu
Copy link

larrasu commented Jan 5, 2023

Is there any update on this? Really wanted to use this instead of the original for the customizable autocomplete. Thank you.

@rifkiard
Copy link

rifkiard commented Jan 5, 2023

Same problem here duhh ):

@NathanAP
Copy link
Owner

NathanAP commented Jan 5, 2023

No updates yet guys, sorry ):

Do you see any errors or something that could help us fix it?

edit: the fast-deep-equal workaround can be found here as well, just in case that someone is looking for it.

@scrtechnologies
Copy link

You can set it to transpile in nuxt.config

build: {
        transpile: [
            'vue-google-maps-community-fork',
            '@googlemaps/markerclusterer',
        ],
    },

@jimmyccy
Copy link

Hi, I am a Nuxt 3 user as well.

Error I got after I followed all the steps in the documentation:
The requested module '/_nuxt/node_modules/.vite/deps/vue-google-maps-community-fork.js?v=813e8d5b' does not provide an export named 'default' (at vueGoogleMaps.ts:2:8)

Workaround:
Commented out the 'vue-google-maps-community-fork' in nuxt.config.ts

vite: {
    optimizeDeps: {
      include: [
        // 'vue-google-maps-community-fork',
        'fast-deep-equal',
      ],
    },
  },

And so far I think I can use most of the components, hope this helps. (Looking for dev who pro in Nuxt 3 though)

@mrweiner
Copy link

mrweiner commented Mar 2, 2023

Hello! Sorry for the delay on answering.

Can this be related to our Vite 4 problem @websitevirtuoso ?

@NathanAP Is there a ticket for the vite 4 problem? I was running into [vite] Internal server error: Cannot read properties of undefined (reading 'default'), curious whether that's the same problem you were seeing?

I fixed it by changing the format of the import in my main.ts from import VueGoogleMaps from 'vue-google-maps-community-fork'; to import * as VueGoogleMaps from 'vue-google-maps-community-fork';.

EDIT: Actually this fixed the error above, but the components themselves fail to resolve.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted You can contribute with this with in any way possible
Projects
None yet
Development

No branches or pull requests

7 participants