Skip to content

[bug] Wagmi packages for nextjs has dependency and unresolved file paths leading to module-not-found #5674

@dave-ops-source

Description

@dave-ops-source

Link to minimal reproducible example

Error Type Build Error ## Error Message Module not found: Can't resolve 'accounts' ## Build Output ./node_modules/@wagmi/core/dist/esm/tempo/Connectors.js:81:26 Module not found: Can't resolve 'accounts' 79 | let disconnect; 80 | async function getAccountsModule() { > 81 | return await import('accounts').catch(() => { | ^^^^^^^^^^^^^^^^^^ 82 | throw new Error('dependency "accounts" not found'); 83 | }); 84 | } Import traces: Client Component Browser: ./node_modules/@wagmi/core/dist/esm/tempo/Connectors.js [Client Component Browser] ./node_modules/@wagmi/connectors/dist/esm/exports/index.js [Client Component Browser] ./node_modules/@reown/appkit-adapter-wagmi/dist/esm/src/utils/helpers.js [Client Component Browser] ./node_modules/@reown/appkit-adapter-wagmi/dist/esm/src/client.js [Client Component Browser] ./config/index.tsx [Client Component Browser] ./context/index.tsx [Client Component Browser] ./context/index.tsx [Server Component] ./app/layout.tsx [Server Component] Client Component SSR: ./node_modules/@wagmi/core/dist/esm/tempo/Connectors.js [Client Component SSR] ./node_modules/@wagmi/connectors/dist/esm/exports/index.js [Client Component SSR] ./node_modules/@reown/appkit-adapter-wagmi/dist/esm/src/utils/helpers.js [Client Component SSR] ./node_modules/@reown/appkit-adapter-wagmi/dist/esm/src/client.js [Client Component SSR] ./config/index.tsx [Client Component SSR] ./context/index.tsx [Client Component SSR] ./context/index.tsx [Server Component] ./app/layout.tsx [Server Component] https://nextjs.org/docs/messages/module-not-found Next.js version: 16.2.6 (Turbopack)

Steps to Reproduce

Install reown/appkit according to docs, run the app on localhost, and it fails to load up

Summary

On running bun dev or npm run dev when is added to layout.tsx the app is failing in localhost. Browser brings the above issue.

List of related npm package versions

├── @reown/appkit@1.8.20
├── @reown/appkit-adapter-wagmi@1.8.20
├── @tailwindcss/postcss@4.3.0
├── @tanstack/react-query@5.100.11
├── @types/node@20.19.41
├── @types/react@19.2.15
├── @types/react-dom@19.2.3
├── eslint@9.39.4
├── eslint-config-next@16.2.6
├── next@16.2.6
├── react@19.2.4
├── react-dom@19.2.4
├── tailwindcss@4.3.0
├── typescript@5.9.3
├── viem@2.50.4
└── wagmi@3.6.15

Node.js Version

v24.15.0

Package Manager

bun@1.3.13

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions