Skip to content

unsupported to use "export *" in a client boundary #3694

Discussion options

You must be logged in to vote

I ran into this exact error when upgrading to Wagmi 1.x. The wagmi/chains re-exports viem/chains. If you look at this file there is no longer an array of all chains, only named exports for each chain.

I had this code in my wagmi config file:

import * as all chains from "wagmi/chains"
  • Next complains about this when being imported from a client component, so I made my own explicit list of chains:
import { type Chain } from "wagmi";
import {  bsc,  bscTestnet,  goerli,  hardhat,  localhost,  mainnet, sepolia } from "viem/chains";

const chainList = [  mainnet,  sepolia,  goerli,  bsc,  bscTestnet,  hardhat,  localhost ];

hope that helps!

EDIT:
just changing the import to viem/chains also w…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by glitch-txs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants