-
Notifications
You must be signed in to change notification settings - Fork 27k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Module not found: Can't resolve '_http_common' #70262
Comments
@vishakha94, that's expected since the newest versions of MSW rely on the built-in |
We should not attempt to bundle builtin node modules on the server. This adds modules provided by Node.js to our externals list (along with some missing internal ones in Turbopack. These were copied from [here](https://github.com/vercel/next.js/blob/a675bde6c738318264573144663e38819aeb2661/crates/next-custom-transforms/src/transforms/warn_for_edge_runtime.rs#L77-L89)). Fixes #70262 Closes NDX-314 # Conflicts: # turbopack/crates/turbopack-resolve/src/resolve.rs
- 실행 시 오류 발생 vercel/next.js#70262
This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
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: