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

The requested module '/node_modules/wnumb/wNumb.js?v=c0698822' does not provide an export named 'default' (at useTooltip.js:2:8) #5

Closed
alexsignly opened this issue Jul 11, 2023 · 4 comments

Comments

@alexsignly
Copy link

I'm trying to integrate this into my Vue3+Vite project get the following error every single time:

Uncaught SyntaxError: The requested module '/node_modules/wnumb/wNumb.js?v=c0698822' does not provide an export named 'default' (at useTooltip.js:2:8)

I also tried creating a fresh Vue3 + Vite and follow your installation steps (from the logged in are) but still no luck.

Do you have any suggestion?

@adamberecz
Copy link
Collaborator

Have you tried using our installation wizard? https://vueform.com/docs/1.x/installation

Vite requires an extra step of adding some libs to optimizeDeps. The basic vite.config.js should look like this:

import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [
    vue({
      template: {
        compilerOptions: {
          isCustomElement: (tag) => ['trix-editor'].indexOf(tag) !== -1
        }
      },
    }),
  ],
  optimizeDeps: {
    include: [
      'nouislider',
      'wnumb',
      'trix'
    ]
  }
})

@pscheit
Copy link

pscheit commented Nov 16, 2023

@adamberecz imho this is missing in the guide:
https://vueform.com/docs/installation
if I select vue or vite it isn't shown, that I have to add this to my vite.js?

I can make a PR or are those files not in a public repo?

@adamberecz
Copy link
Collaborator

Thanks @pscheit , but these should not be required anymore - instead we have a Vite plugin that contains everything that needs to be added to vite.config.js.

@pscheit
Copy link

pscheit commented Nov 16, 2023

oooh! i missed this in the setup guide, cause i clicked on vue. Thanks!

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