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

Error on search on new project #1007

Open
kmilogp8496 opened this issue Nov 17, 2023 · 3 comments
Open

Error on search on new project #1007

kmilogp8496 opened this issue Nov 17, 2023 · 3 comments

Comments

@kmilogp8496
Copy link

After creating a new project and starting the dev server, the following error appears in console:

Uncaught SyntaxError: The requested module '/_nuxt/node_modules/.pnpm/@[email protected][email protected][email protected][email protected]/node_modules/@vueuse/integrations/useFuse.mjs?v=d41e5a87' does not provide an export named 'UseFuseOptions'

Also, the search functionality does not work because of this.

The error comes from the component components/app/AppSearch.vue in the following import:

import { useFuse, UseFuseOptions } from '@vueuse/integrations/useFuse'

@kmilogp8496 kmilogp8496 changed the title Error on new project Error on search on new project Nov 17, 2023
@shershen08
Copy link

I have the same ussue

@trc-mathieu
Copy link

This is due to a new compilerOptions that the nuxt team decided to set to true by default which require all type imports to be explicitly imported like import type {useFuseOptions} from ...
The fix was already made in the repo but in the meantime, you can just disable verbatimModuleSyntax by adding this in your nuxt.config

export default defineNuxtConfig({
  typescript: {
    tsConfig: {
      compilerOptions: {
        verbatimModuleSyntax: false
      }
    }
  }
})

This MR fixes it and is already merged so the fix would be in the next release: #997

@LlamaTheHutt
Copy link

@trc-mathieu I've been looking all night for this. Thank you so much!

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

4 participants