Skip to content

Commit c0a8c88

Browse files
authored
Fix undici warning showing unexpectedly (#42444)
Fixes: #42441 ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have a helpful link attached, see `contributing.md` ## Feature - [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Documentation added - [ ] Telemetry added. In case of a feature if it's used or not. - [ ] Errors have a helpful link attached, see `contributing.md` ## Documentation / Examples - [ ] Make sure the linting passes by running `pnpm build && pnpm lint` - [ ] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
1 parent 0eed107 commit c0a8c88

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/next/server/config.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,11 @@ const experimentalWarning = execOnce(
5959

6060
export function setHttpClientAndAgentOptions(config: NextConfig) {
6161
if (isAboveNodejs16) {
62-
if (config.experimental?.enableUndici && isAboveNodejs18) {
62+
if (
63+
config.experimental?.enableUndici &&
64+
!config.experimental?.appDir &&
65+
isAboveNodejs18
66+
) {
6367
Log.warn(
6468
`\`enableUndici\` option is unnecessary in Node.js v${NODE_18_VERSION} or greater.`
6569
)

0 commit comments

Comments
 (0)