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

Nuxt won't start Cannot use 'in' operator to search for 'package' in pinia #165

Closed
therealokoro opened this issue Apr 4, 2023 · 4 comments

Comments

@therealokoro
Copy link

image

So this error comes up only when i try to use nuxt devtools

@antfu
Copy link
Member

antfu commented Apr 4, 2023

Can you share a minimal reproduction? Thanks.

@ayanoakune
Copy link

@therealokoro Hi there! I took a look at your latest repository on your Github profile, and I saw that you have the following in your config:

export default defineNuxtConfig({
  // ...
  imports: { 
    dirs: ["stores"], 
    presets: ["pinia"], //  <-- This is causing problem.
  },
  // ...
})

I checked the Nuxt configuration API and seems there is not such property for imports: https://nuxt.com/docs/api/configuration/nuxt-config#imports

If this is not required or used by anything, then removing it would solve the issue.

@therealokoro
Copy link
Author

therealokoro commented Apr 7, 2023

@robertlillipuu. That's weird. It isn't in the docs.

image

image

Take a look at the screenshot above. Note that the nuxt version as at the time of taking the screenshot here is v3.3.3.

You can see that the presets options is there and offers a few possible options you can choose from.

@danielroe, @antfu could you please look into this. Thank you

@therealokoro
Copy link
Author

I did notice that it's the cause of the problem as mentioned by @robertlillipuu. Removing it fixes the issue.

@antfu antfu closed this as completed in bba0496 Apr 7, 2023
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

3 participants