Thanks to visit codestin.com
Credit goes to github.com

Skip to content

autoimport Nuxt eventemitter3 does not provide an export named 'default' #3977

@reslear

Description

@reslear

Describe the bug

If you delete imports, Nuxt auto-imports do not work:

for example works:

<script setup lang="ts">
import { useAccount, useDisconnect } from '@wagmi/vue';

const { address, chainId, status } = useAccount();
const { disconnect } = useDisconnect();
</script>

not working:

<script setup lang="ts">
const { address, chainId, status } = useAccount();
const { disconnect } = useDisconnect();
</script>
Screenshot 2024-05-23 at 16 06 16
Uncaught SyntaxError: The requested module '/_nuxt/node_modules/.pnpm/[email protected]/node_modules/eventemitter3/index.js?v=2c858a2b' 
does not provide an export named 'default' (at index.mjs:1:8)

Link to Minimal Reproducible Example

https://stackblitz.com/~/github.com/reslear/nuxt-wagmi-starter

Steps To Reproduce

stackblitz also not working because metask sdk issues.

  1. clone repo github.com/reslear/nuxt-wagmi-starter

  2. install and run dev:

pnpm install
pnpm dev
  1. go to components/Account.vue and comment import line:
Screenshot 2024-05-23 at 16 09 31
  1. see result

Wagmi Version

latest

Viem Version

latest

TypeScript Version

latest

Check existing issues

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions