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

Unable to expand wildcard path Nuxt Js #111

Closed
sinangulsever opened this issue Sep 7, 2020 · 7 comments
Closed

Unable to expand wildcard path Nuxt Js #111

sinangulsever opened this issue Sep 7, 2020 · 7 comments

Comments

@sinangulsever
Copy link

Unable to expand wildcard path 'userbilgi/*':

Nuxt component
image

Store folder
image

Store module
image

Console error
image

Why does this problem occur?

@davestewart
Copy link
Owner

Hey. Did you check the order of your store and router imports as the error suggests?

@sinangulsever
Copy link
Author

" - Make sure the store is imported before the router, then reload"
how can i do this in nuxt js

@sinangulsever
Copy link
Author

Vuex

image

@davestewart
Copy link
Owner

Oh crap, I forgot about Nuxt!

Not 100% sure about this one (it's been a long time since I looked at the source) but can you try making the module and its calls, namespaced? Do you know how to do that?

PS. easier to post real code then I can make alterations and post back.

@davestewart
Copy link
Owner

OK - it seems this might b a bug in Nuxt that is still not fixed:

The solution is to NOT use wildcards.

This will make your code clearer, anyway.

Wildcards are useful, mainly for large options sets, but better to make your code explicit.

@sinangulsever
Copy link
Author

I removed the wildcard characters.
image

Component
image

This time it gave a different error
image

@davestewart
Copy link
Owner

davestewart commented Sep 7, 2020

Ah, sorry... you will need to specify the properties manually (rather than using the * character, which effectively says "please get all properties"), so:

computed: {
  ...sync('userbilgi', [
    'name',
    'lastname',
  ])
}

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