You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using the react wallet kit in a Next.js v14 app does not work. It throws the following error
❯ npm run build
> [email protected] build
> next build
▲ Next.js 14.2.7
Creating an optimized production build ...
Failed to compile.
./node_modules/@arweave-wallet-kit/react/dist/index.es.js
Module parse failed: 'super' keyword outside a method (2540:12)
File was processed with these loaders:
* ./node_modules/next/dist/build/webpack/loaders/next-flight-client-module-loader.js
* ./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js
You may need an additional loader to handle the result of these loaders.
| var _this;
| var t = function() {
> super(...args), _this = this;
| for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
| args[_key] = arguments[_key];
Import trace for requested module:
./node_modules/@arweave-wallet-kit/react/dist/index.es.js
./src/components/ArweaveWalletProvider.tsx
> Build failed because of webpack errors
Problem
Using the react wallet kit in a Next.js v14 app does not work. It throws the following error
Reproduction
Simply use the provider component in a barebones Next.js v14 app, you will get the error during build (or dev).
Repo if needed: https://github.com/femaury/wallet-kit-react-nextjs-14
Dist code fix
Modifying the
index.es.js
dist file directly fixes the build issue (line 2626):Any clue as what part of the code is causing this? Trying to understand what's causing webpack to produce this error code.
The text was updated successfully, but these errors were encountered: