Next.js Discord

Discord Forum

How to Disable Webpack

Unanswered
Cuban Crocodile posted this in #help-forum
Open in Discord
Cuban CrocodileOP
Hi everyone, I am currently setting up a custom OAuth/OIDC provider for next-auth. I want to debug parts of the process but I can't seem to disable Webpack which compiles specific files preventing breakpoints. I've tried solutions like https://gist.github.com/aweber1/bd322f1501b32bf2c7b0093685916c8c, but they don't seem to work. Anyone have any ideas?

Specifically I want to prevent files like webpack-internal:///(rsc)/./node_modules/oauth4webapi/build/index.js from being compile in my error example below
[auth][error] OperationProcessingError: "response" is not a conform Authorization Server Metadata response
    at Module.processDiscoveryResponse (webpack-internal:///(rsc)/./node_modules/oauth4webapi/build/index.js:287:15)
    at getAuthorizationUrl (webpack-internal:///(rsc)/./node_modules/@auth/core/lib/actions/signin/authorization-url.js:25:68)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Module.signIn (webpack-internal:///(rsc)/./node_modules/@auth/core/lib/actions/signin/index.js:16:56)
    at async AuthInternal (webpack-internal:///(rsc)/./node_modules/@auth/core/lib/index.js:72:24)
    at async Auth (webpack-internal:///(rsc)/./node_modules/@auth/core/index.js:126:34)
    at async /Users/samwong/Security/Projects/imhere/node_modules/next/dist/compiled/next-server/app-route.runtime.dev.js:6:63809
...

3 Replies

Cuban CrocodileOP
I should mention I am using next 14.1.4 with app router and next-auth v5
or even if there is a location for the webpack sourcemaps for the server code, that might help solve my problem
Cuban CrocodileOP
I was even trying to proxy serverside outgoing requests to try and debug but couldn't find a solution