Error on Nuxt 3 stable

I tried to use Web3Auth on a Nuxt 3.0.0 project but I cannot make it work.
As Nuxt uses Vite, I followed the instructions here and I updated my nuxt.config.ts to add these options on vite config but I still have several error

Error: Build failed with 4 errors:

node_modules/vite-plugin-eslint/dist/index.mjs:1:116: ERROR: No matching export in “node-modules-polyfills:fs” for import “existsSync”
node_modules/vite-plugin-eslint/node_modules/@rollup/pluginutils/dist/es/index.js:1:18: ERROR: No matching export in “node-modules-polyfills:path” for import “win32”
node_modules/vite-plugin-eslint/node_modules/@rollup/pluginutils/dist/es/index.js:1:25: ERROR: No matching export in “node-modules-polyfills:path” for import “posix”
at failureErrorWithLog (C:\Users\XXXX\node_modules\vite\node_modules\esbuild\lib\main.js:1566:15)
at C:\Users\XXXX\node_modules\vite\node_modules\esbuild\lib\main.js:1024:28
at runOnEndCallbacks (C:\Users\XXXX\node_modules\vite\node_modules\esbuild\lib\main.js:1438:61)
at buildResponseToResult (C:\Users\XXXX\node_modules\vite\node_modules\esbuild\lib\main.js:1022:7)
at C:\Users\XXXX\node_modules\vite\node_modules\esbuild\lib\main.js:1134:14
at responseCallbacks.<computed> (C:\Users\XXXX\node_modules\vite\node_modules\esbuild\lib\main.js:671:9)
at handleIncomingPacket (C:\Users\XXXX\node_modules\vite\node_modules\esbuild\lib\main.js:726:9)
at Socket.readFromStdout (C:\Users\XXXX\node_modules\vite\node_modules\esbuild\lib\main.js:647:7)
at Socket.emit (node:events:390:28)
at Socket.emit (node:domain:475:12)
at addChunk (node:internal/streams/readable:315:12)
at readableAddChunk (node:internal/streams/readable:289:9)
at Socket.Readable.push (node:internal/streams/readable:228:10)
at Pipe.onStreamRead (node:internal/stream_base_commons:199:23)```

Any idea of the source of the bug ?



Originally posted by: copostic

Check the discussion at: https://github.com/orgs/Web3Auth/discussions/950

1 Like

Hi there, did you end up solving this?

Hey @maseh

We did add the Vite polyfill page on our docs. But I haven’t had time to make an example out of it.

Please refer to Vite Polyfills Issue | Documentation

If you are working on it, could you please share the repo here so that we can work together on it?

We do have React-Vite Example here.