Archived Content from Web3Auth Community
This topic was originally posted by alexmazzon on 9/21/2023.
This content has been migrated from our previous community forum to preserve valuable discussions.
Please provide the following details too when asking for help in this category:
- SDK Version: 7.x.x
- Platform: NextJs
- Browser Console Screenshots:
Please provide the Web3Auth initialization and login code snippet below:
Hi, iām trying to use Web3Auth inside a Next 13.4 project.
This is my next config, following the guide
/** @type {import('next').NextConfig} */ const { ProvidePlugin } = require("webpack"); const nextConfig = { distDir: ".next", reactStrictMode: true, output: "standalone", rewrites: async () => [ { source: "/public/creator.html", destination: "/api/creator.js", }, ], webpack: (config, webpack) => { const fallback = config.resolve.fallback || {}; Object.assign(fallback, { crypto: false, // require.resolve("crypto-browserify") can be polyfilled here if needed stream: false, // require.resolve("stream-browserify") can be polyfilled here if needed assert: false, // require.resolve("assert") can be polyfilled here if needed http: false, // require.resolve("stream-http") can be polyfilled here if needed https: false, // require.resolve("https-browserify") can be polyfilled here if needed os: false, // require.resolve("os-browserify") can be polyfilled here if needed url: false, // require.resolve("url") can be polyfilled here if needed zlib: false, // require.resolve("browserify-zlib") can be polyfilled here if needed }); config.resolve.fallback = fallback; config.plugins = (config.plugins || []).concat([ new ProvidePlugin({ process: "process/browser", Buffer: ["buffer", "Buffer"], }), ]); config.ignoreWarnings = [/Failed to parse source map/]; config.module.rules.push({ test: /\.(js|ts|mjs|jsx)$/, enforce: "pre", loader: require.resolve("source-map-loader"), resolve: { fullySpecified: false, }, }); return config; }, };module.exports = nextConfig;
Using the sample code provided in the P&P guide i still got the error showed on the screenshot. Anyone can help me?
