[bug] Appkit: failed to compile metamask-sdk.js in nextjs with turbo mode
Link to minimal reproducible example
https://github.com/agualis/next-wagmi-app-router
Summary
Instructions to reproduce:
pnpm install
pnpm run dev --turbo
Opening app in localhost:3000 will crash with:
Build Error
Failed to compile
./node_modules/.pnpm/@[email protected][email protected][email protected]/node_modules/@metamask/sdk/dist/browser/es/metamask-sdk.js:1:419267
Expected behaviour:
App should should work as when running it in webpack mode (pnpm run dev).
Extra:
It looks related with this fixed issue.
Note that the provided reproduction repo was copied from reown appkit examples directory so you could also reproduce it there.
List of related npm package versions
"@reown/appkit": "1.7.4", "@reown/appkit-adapter-wagmi": "1.7.4", "viem": "2.23.13", "wagmi": "2.14.16", "next": "14.2.28"
Node.js Version
v20.10.0
Package Manager
@agualis thanks for reporting! are you temporarily unblocked by dropping --turbo and running pnpm run dev?
Note that the provided reproduction repo was copied from reown appkit examples directory so you could also reproduce it there.
We're currently migrating to Next 15.3 so may encounter as part of that
@agualis thanks for reporting! are you temporarily unblocked by dropping --turbo and running pnpm run dev?
That works but it's not an option as webpack speed makes DX too painful.
We're currently migrating to Next 15.3 so may encounter as part of that
We are also about to migrate to Next 15.x but it would be desirable to make it work with any Next version.
Thanks for the update.
Hey @agualis Are you ok with this for now?
Hey, we are not. See my previous comment: this issue implies using webpack for development which is not an option for us.