payloadcms / payload

Payload is the open-source, fullstack Next.js framework, giving you instant backend superpowers. Get a full TypeScript backend and admin panel instantly. Use Payload as a headless CMS or for building powerful applications.
https://payloadcms.com
MIT License
25.77k stars 1.64k forks source link

Payload uses outdated Next.js config options #8011

Closed hdodov closed 2 months ago

hdodov commented 2 months ago

Link to reproduction

No response

Environment Info

Binaries:
  Node: 20.9.0
  npm: 10.1.0
  Yarn: 1.22.19
  pnpm: 9.8.0
Relevant Packages:
  payload: 3.0.0-beta.97
  next: 15.0.0-rc.0
  @payloadcms/db-mongodb: 3.0.0-beta.97
  @payloadcms/email-nodemailer: 3.0.0-beta.97
  @payloadcms/graphql: 3.0.0-beta.97
  @payloadcms/next/utilities: 3.0.0-beta.97
  @payloadcms/plugin-cloud: 3.0.0-beta.97
  @payloadcms/plugin-cloud-storage: 3.0.0-beta.97
  @payloadcms/richtext-lexical: 3.0.0-beta.97
  @payloadcms/storage-s3: 3.0.0-beta.97
  @payloadcms/translations: 3.0.0-beta.97
  @payloadcms/ui/shared: 3.0.0-beta.97
  react: 19.0.0-rc-fb9a90fa48-20240614
  react-dom: 19.0.0-rc-fb9a90fa48-20240614
Operating System:
  Platform: darwin
  Arch: x64
  Version: Darwin Kernel Version 23.6.0: Mon Jul 29 21:13:00 PDT 2024; root:xnu-10063.141.2~1/RELEASE_X86_64
  Available memory (MB): 32768
  Available CPU cores: 16

Describe the Bug

When starting Payload, I get the following warnings:

⚠ Invalid next.config.mjs options detected: 
⚠     Unrecognized key(s) in object: 'outputFileTracingExcludes', 'outputFileTracingIncludes'
⚠ See more info here: https://nextjs.org/docs/messages/invalid-next-config

…and I can in fact see them being provided in the withPayload() function. Perhaps they should be removed?

Reproduction Steps

  1. Install the latest Payload with Next 15.0.0-rc.0
  2. npm run dev
  3. See the warnings

Adapters and Plugins

No response

hdodov commented 2 months ago

Actually, this appears to have been caused by an outdated version of Next (although I was using the RC one 😬). The warning no longer appears with:

github-actions[bot] commented 2 months ago

This issue has been automatically locked. Please open a new issue if this issue persists with any additional detail.