Module not found: Can't resolve '_http_common' #70262
Labels
bug
Issue was opened via the bug report template.
Developer Experience
Issues related to Next.js logs, Error overlay, etc.
Runtime
Related to Node.js or Edge Runtime with Next.js.
Webpack
Related to Webpack with Next.js.
Link to the code that reproduces this issue
mswjs/msw#2291
To Reproduce
Please follow the reproduction steps in the linked issue above.
Current vs. Expected behavior
Current
Next.js throws an error, unable to import a built-in
_http_common
module in Node.js.Expectd
Next.js properly imports the built-in module.
Provide environment information
Which area(s) are affected? (Select all that apply)
Developer Experience, Runtime, Webpack
Which stage(s) are affected? (Select all that apply)
next dev (local), next build (local), next start (local), Vercel (Deployed)
Additional context
I believe this is caused by the Next's default webpack config not listing
_http_common
inconfig.externals
.Any thoughts on listing all built-in Node.js modules as external?
I'm proposing this because contributors report that adding
_http_common
intoconfig.externals
helps them. This should be handled on Next's side.The text was updated successfully, but these errors were encountered: