nuxt: [nuxt] Cannot load payload /_payload.json
Environment
- Operating System: Windows_NT
- Node Version: v18.16.0
- Nuxt Version: 3.6.2
- Nitro Version: 2.5.2
- Package Manager: npm@9.8.0
- Builder: vite
- User Config: pages, debug, dev, modules, pwa, app, vue, ignore
- Runtime Modules: @nuxt/devtools@0.2.5
- Build Modules: -
Reproduction
its a pretty big project, It always worked fine and all I did before this happened was running npm install
Describe the bug
When using my nuxt site using a different domain navigating to other pages stops working
when I build my site and upload it to azure it comes available on multiple domains
- the azure domain (Site works fine here)
- Our domain with a special subdomain (usually its help.domain.app)
On our subdomain the website navigation stops working and spits out the following error:
Additional context
No response
Logs
build logs
https://hastebin.com/share/oyamipasuv.bash
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 5
- Comments: 18 (8 by maintainers)
What I’ve found out is that since
v3.6.2we need to explicitly setexperimental.payloadExtractiontotrue. Otherwise the_payload.jsonfiles are not generated (in SSG mode).Had the issue with
v3.6.3I think the problem is that after https://github.com/nuxt/nuxt/pull/21860,
process.env.NUXT_PAYLOAD_EXTRACTIONis not set correctly anymore as the override from the PR comes “too late”.Experienced this when attempting to deploy a fully static site with payload extraction.
Downgrade to 3.6.1 fixed it for me.
You can probably work around this by adding:
This should be properly resolved with https://github.com/nuxt/nuxt/issues/21370.
Other context: https://github.com/nuxt/nuxt/issues/15024.