bridge: The requested module does not provide an export named 'createDefu'
See original GitHub issueEnvironment
- Operating System:
Darwin
- Node Version:
v14.16.0
- Nuxt Version:
2.16.0-27358576.777a4b7f
- Package Manager:
npm@6.14.11
- Builder:
webpack
- User Config:
telemetry
,hooks
,mode
,target
,head
,css
,plugins
,components
,modules
,build
,srcDir
,server
,loading
,render
,publicRuntimeConfig
,privateRuntimeConfig
,proxy
,serverMiddleware
,router
,bridge
,buildModules
- Runtime Modules:
@nuxtjs/proxy@2.1.0
,@nuxt/http@0.5.13
,@nuxtjs/device@1.2.7
,@nuxtjs/svg@0.1.12
- Build Modules:
@nuxt/bridge@3.0.0-27545203.75e046f
Reproduction
I use “@nuxt/bridge”: “npm:@nuxt/bridge-edge@^3.0.0-27454252.7bf338d” to upgrade nuxt2 to nuxt/bridge version
Need some helps when i use npm run dev
run dev environment get The above error, thanks ~
Describe the bug
use npm i
install packages and npm run dev
run dev environment:
error logs:
ERROR [worker reload] [worker init] The requested module 'file:///Users/w/workspace/node_modules/defu/dist/defu.mjs' does not provide an export named 'createDefu'
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'
at ModuleJob._instantiate (internal/modules/esm/module_job.js:104:21)
at async ModuleJob.run (internal/modules/esm/module_job.js:149:5)
at async Loader.import (internal/modules/esm/loader.js:166:24)
at async Object.loadESM (internal/process/esm_loader.js:68:5)
and use npm why defu
:
✦ ❯ npm-why defu
Who required defu:
web > @nuxt/bridge > unplugin-vue2-script-setup > defu@5.0.1
web > nuxt-edge > @nuxt/cli-edge > @nuxt/config-edge > defu@5.0.1
web > nuxt-edge > @nuxt/cli-edge > defu@5.0.1
web > nuxt-edge > @nuxt/config-edge > defu@5.0.1
web > nuxt-edge > @nuxt/core-edge > @nuxt/config-edge > defu@5.0.1
web > nuxt-edge > @nuxt/core-edge > @nuxt/server-edge > @nuxt/vue-renderer-edge > defu@5.0.1
web > nuxt-edge > @nuxt/core-edge > @nuxt/server-edge > serve-placeholder > defu@5.0.1
web > nuxt-edge > @nuxt/generator-edge > defu@5.0.1
web > nuxt-edge > @nuxt/loading-screen > defu@5.0.1
web > nuxt-edge > @nuxt/server-edge > @nuxt/vue-renderer-edge > defu@5.0.1
web > nuxt-edge > @nuxt/server-edge > serve-placeholder > defu@5.0.1
web > nuxt-edge > @nuxt/telemetry > defu@5.0.1
web > nuxt-edge > @nuxt/vue-renderer-edge > defu@5.0.1
Additional context
No response
Logs
No response
Issue Analytics
- State:
- Created a year ago
- Reactions:7
- Comments:8 (1 by maintainers)
Top Results From Across the Web
bridge: The requested module does not provide an export ...
Just got this running. Either you install the package defu manually to the devDependencies or you delete the package-lock.json file, delete all ...
Read more >"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 >the requested module 'vue' does not provide an export named ...
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 >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 >Fix list for IBM WebSphere Application Server V8.5
IBM WebSphere Application Server provides periodic fixes for the base and Network ... PH32868, Exported ear file does not include latest application files....
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
Deleting the
package-lock.json
andnode_modules
doesn’t fix it for me. However, installing defu manually does work, but that feels like a bad workaround.For now, manually adding
defu
to yourpackage.json
is the right way to solve this.