Skip to content

Commit

Permalink
Fix undici warning showing unexpectedly (#42444)
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
ijjk committed Nov 3, 2022
1 parent 0eed107 commit c0a8c88
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/next/server/config.ts
Expand Up @@ -59,7 +59,11 @@ const experimentalWarning = execOnce(

export function setHttpClientAndAgentOptions(config: NextConfig) {
if (isAboveNodejs16) {
if (config.experimental?.enableUndici && isAboveNodejs18) {
if (
config.experimental?.enableUndici &&
!config.experimental?.appDir &&
isAboveNodejs18
) {
Log.warn(
`\`enableUndici\` option is unnecessary in Node.js v${NODE_18_VERSION} or greater.`
)
Expand Down

0 comments on commit c0a8c88

Please sign in to comment.