Skip to content

Conversation

@farnabaz
Copy link
Member

@farnabaz farnabaz commented Nov 18, 2025

… config hook

🔗 Linked issue

resolves #3613

❓ Type of change

  • 📖 Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

This was an attempt to solve #3613. But it seems that it works only if we move route to /api/**.

Nitro cache + server handler on modules:done hook does not work if it is not prefixed with /api /cc @pi0 @atinux

📝 Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@vercel
Copy link

vercel bot commented Nov 18, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
content Ready Ready Preview Comment Dec 8, 2025 5:18pm

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Nov 18, 2025

Deploying content with  Cloudflare Pages  Cloudflare Pages

Latest commit: 237125b
Status: ✅  Deploy successful!
Preview URL: https://b1a645c0.content-f0q.pages.dev
Branch Preview URL: https://fix-nitro-cache.content-f0q.pages.dev

View logs

@pkg-pr-new
Copy link

pkg-pr-new bot commented Dec 8, 2025

npm i https://pkg.pr.new/@nuxt/content@3617

commit: 237125b

@farnabaz
Copy link
Member Author

farnabaz commented Dec 8, 2025

@maximepvrt This PR should resolve the issue, I would appreciate if you can verify using pr-release? 🙏

@maximepvrt
Copy link
Contributor

@farnabaz it's perfect for me ;-) Thanks !

@maximepvrt
Copy link
Contributor

maximepvrt commented Dec 10, 2025

@farnabaz but in this branch/pk.pr.new I have error with yml parcing if I active nitro cache

 nitro: {
        routeRules: {
            '**': {
                cache: {
                    varies: ['host', 'x-forwarded-host']
                }
            },
        }
    }

[@nuxt/content 14:39:38] WARN "devenirBenevole/devenir-benevole/index.yml" is ignored because parsing is failed. Error: Cannot read properties of undefined (reading 'value')

title: Être bénévole
name: Devenir bénévole
description: Vous souhaitez vivre une expérience utile et agréable par le bénévolat ? bravo ! Peut-être avez vous une idée très précise de ce que vous souhaitez faire. Peut-être moins. Nous sommes là pour vous aider à vous y retrouver !
items:
  - title: S'engager pour une cause
    description: Découvrez les différents domaines d’activités des associations et choisissez
      de faire du bénévolat dans les causes qui vous tiennent le plus à coeur.
    to: "/devenir-benevole/domaine"
    image: "/devenir-benevole/domaine.svg"
  - title: Agir localement
    description: Les associations recherchent des bénévoles partout en France. Découvrez
      les missions de bénévolat proposées par les associations locales !
    to: "/devenir-benevole/france"
    image: "/devenir-benevole/france.svg"
  - title: Agir à tout âge
    description: Que l’on soit étudiant, jeune actif, demandeur d’emploi, femme, homme,
      retraité, diplômé, décrocheur, ou dans une toute autre situation, il y a toujours
      une bonne raison de faire du bénévolat.
    to: "/devenir-benevole/profil"
    image: "/devenir-benevole/profil.svg"
  - title: Partager ses compétences
    description: Découvrez les différentes activités dans lesquelles vous pouvez faire
      du bénévolat et partagez votre expérience et votre énergie.
    to: "/devenir-benevole/activite"
    image: "/devenir-benevole/domaine.svg"
  - title: Rejoindre une association nationale
    description: Il existe forcément une antenne locale d"une organisation nationale
      près de chez vous.
    to: "/reseau"
    external: true
    image: "/devenir-benevole/reseau.svg"

@farnabaz
Copy link
Member Author

farnabaz commented Dec 11, 2025

@maximepvrt This is even stranger that original issue. Do you mind monkey patch and add a log here to show the error trace and find the line?

logger.warn(`"${keyInCollection}" is ignored because parsing is failed. Error: ${e instanceof Error ? e.message : 'Unknown error'}`)

Also may I have access to repo? is it public?

@maximepvrt
Copy link
Contributor

@farnabaz I just sent you a DM on Discord regarding this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Nuxt Content API crashes when using Nitro multi-domain cache (varies)

3 participants