You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Run npm run build and observe the build result with and without use cache
Current vs. Expected behavior
Current
When using use cache in sitemap.ts, in an attempt to create a static sitemap, the following error is thrown during the built time.
PROD build error
Error occurred prerendering page "/sitemap.xml". Read more: https://nextjs.org/docs/messages/prerender-errorInvariantError: Invariant: Missing Client Reference Manifest for /sitemap.xml. This is a bug in Next.js.at v (path/to/.next/server/chunks/118.js:3:5880)at sitemap (path/to/.next/server/chunks/118.js:3:16025)at C (path/to/.next/server/app/sitemap.xml/route.js:1:1744)at runNextTicks (node:internal/process/task_queues:65:5)at process.processImmediate (node:internal/timers:459:9)at process.callbackTrampoline (node:internal/async_hooks:130:17)at async Immediate.<anonymous> (path/to/node_modules/next/dist/compiled/next-server/app-route-experimental.runtime.prod.js:18:17864)Export encountered an error on /sitemap.xml/route: /sitemap.xml, exiting the build.⨯ Static worker exited with code: 1 and signal: null
DEV build error
✓Compiled/sitemap.xmlin10.2s(1246modules)⨯Error[InvariantError]: Invariant: MissingmanifestforServerActions.ThisisabuginNext.js.atgetClientReferenceManifestForRsc(..\..\..\src\server\app-render\encryption-utils.ts:139:10)137|138|if(!serverActionsManifestSingleton){>139|thrownewInvariantError('Missing manifest for Server Actions.')|^140|}141|142|const{ clientReferenceManifestsPerPage }=serverActionsManifestSingleton
Expected use cache should be able to use in sitemap.ts to create a static sitemap.
Provide environment information
Operating System:
Platform: win32
Arch: x64
Version: Windows 11 Home
Available memory (MB): 32493
Available CPU cores: 20
Binaries:
Node: 22.12.0
npm: 10.9.0
Yarn: 1.22.19
pnpm: 9.9.0
Relevant Packages:
next: 15.1.1-canary.13 // Latest available version is detected (15.1.1-canary.13).
eslint-config-next: 15.1.1-canary.13
react: 19.0.0
react-dom: 19.0.0
typescript: 5.7.2
Next.js Config:
output: N/A
Which area(s) are affected? (Select all that apply)
dynamicIO
Which stage(s) are affected? (Select all that apply)
next dev (local), next build (local)
Additional context
Setting dynamic to force-static instead of using use cache doesn't seem to have any effect, properly due to dynamicIO being enabled,
The text was updated successfully, but these errors were encountered:
mwskwong
changed the title
[DynamicIO] [Sitemap] Unable to create a cached/static sitemap.ts
[DynamicIO] [Sitemap] Unable to create a cached/static sitemap.ts with use cacheDec 19, 2024
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
https://github.com/mwskwong/next-dynamic-io-sitemap-cache-bug
To Reproduce
use cache
insitemap.ts
npm run build
and observe the build result with and withoutuse cache
Current vs. Expected behavior
Current
When using
use cache
insitemap.ts
, in an attempt to create a static sitemap, the following error is thrown during the built time.PROD build error
DEV build error
Expected
use cache
should be able to use insitemap.ts
to create a static sitemap.Provide environment information
Which area(s) are affected? (Select all that apply)
dynamicIO
Which stage(s) are affected? (Select all that apply)
next dev (local), next build (local)
Additional context
Setting
dynamic
toforce-static
instead of usinguse cache
doesn't seem to have any effect, properly due todynamicIO
being enabled,The text was updated successfully, but these errors were encountered: