/node_modules/defu/dist/defu.mjs' does not provide an export named 'createDefu'
See original GitHub issueEnvironment
Nuxt project info: 16:41:33
- Operating System:
Darwin
- Node Version:
v16.13.0
- Nuxt Version:
3.0.0-27495976.e31c604
- Package Manager:
npm@8.1.0
- Builder:
vite
- User Config:
modules
,sitemap
,vue
,privateRuntimeConfig
,publicRuntimeConfig
,css
,buildModules
,build
- Runtime Modules:
~/modules/sitemap
- Build Modules:
@nuxtjs/tailwindcss@5.0.2
,@pinia/nuxt@0.1.8
Reproduction
Describe the bug
after update return this error
import { createDefu } from 'node_modules/defu/dist/defu.mjs';
^^^^^^^^^^
SyntaxError: The requested module 'node_modules/defu/dist/defu.mjs' does not provide an export named 'createDefu'
Additional context
No response
Logs
No response
Issue Analytics
- State:
- Created a year ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
"The requested module ' does not provide an export named ...
You've confirmed that the package.json in the module's folder doesn't have "type": "module" in it. That's the issue. It's using the older ...
Read more >Requested module does not provide export named 'default'
To solve the error "The requested module does not provide an export named default", use the `default` keyword when exporting a value from...
Read more >vue 2.7 the requested module does not provide an export ...
The reason it didn't work is that Vue provides a named export, whereas you are trying to import it as though it had...
Read more >Common Issues - Nuxt Vite
Uncaught SyntaxError: The requested module ... does not provide an export named 'default'. Vite has an issue for pre-bundling dependencies ...
Read more >Snowpack - The requested module '/web_modules/recoil.js ...
Uncaught SyntaxError: The requested module '/web_modules/recoil.js' does not provide an export named 'RecoilRoot'. I will talk about how to ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for sharing the output. v5 seems to be hoisted because of
unocss > defu
. (/cc @antfu)In the meantime, as a workaround you can directly add
defu
dependency to your project.Upgrading UnoCSS to
v0.31.1
should fix this problem. Thanks.