question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: "defuFn is not a function" in 3.0.0-rc.9-xx

See original GitHub issue

Environment


  • Operating System: MacOS
  • Node Version: v16.17.0
  • Nuxt Version: 3.0.0-rc.9-27702110.abd5dc5
  • Package Manager: npm@8.15.0
  • Bundler: Vite
  • User Config: -
  • Runtime Modules: -
  • Build Modules: -

Reproduction

package.json

  "dependencies": {
    "@headlessui/vue": "^1.6.7",
    "@heroicons/vue": "^1.0.6",
    "nuxt": "npm:nuxt3@^3.0.0-rc.9-27702110.abd5dc5",
    "pinia": "^2.0.21",
    "primeicons": "^5.0.0",
    "primevue": "^3.15.0",
    "vue": "^3.2.37"
  }

Describe the bug

When trying to fix loading problem of resources (ex: js files…) to follow cdnURL path with the version 3.0.0-rc.9-27702110.abd5dc5, and the resources loading problem was solved perfectly, thank you!

But there was an error with:

__vite_ssr_import_0__.defuFn is not a function

Temp Solution:

I solved it with adding defu dependencies "defu": "^6.1.0" in package.json for now.

npm i defu

Has anyone run into the same problem? Or other solutions? Thank you!

Additional context

No response

Logs

No response

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:8
  • Comments:47 (6 by maintainers)

github_iconTop GitHub Comments

13reactions
JagrutiPanchamcommented, Sep 11, 2022

just write ssr: false in nuxt.config.ts

4reactions
shiv122commented, Sep 18, 2022

check if you have any node_module in your home directory. for ex. if you are on windows goto c/Users/<you username> and check for node_module folder. if theres on rename or delete it. this works for me. source

Read more comments on GitHub >

github_iconTop Results From Across the Web

Nuxt 3 + Pinia : [h3] [unhandled] H3Error ... - Stack Overflow
When installing the pinia package via npm i pinia , I got a bunch of errors, similar to what's described here.
Read more >
[h3] [unhandled] H3Error: __vite_ssr_import_0__.defineStore ...
defineStore is not a function at createError (file:///<path/to/my/project>/node_modules/h3/dist/index.mjs:196:15) at Server.
Read more >
Console.warn is not a function - Community Support - Temporal
Im using xstate inside one of our workflows, a few days ago they updated their repo to add a console.warn statement inside of...
Read more >
Getting following error ERROR [worker] __vite_ssr_import_0 ...
Getting following error. ERROR [worker] __vite_ssr_import_0__.useStore is not a function. 1 like Like Reply. manojap profile image.
Read more >
[nuxt] [request error] require is not defined in es module scope ...
Operating System: Darwin; Node Version: v17.8.0; Nuxt Version: 3.0.0-rc.1; Package Manager: yarn@1.22.18; Builder: vite; User Config: vue , head , plugins ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found