Skip to content

fix: Not working with nuxt content v3 #497

@niko-38500

Description

@niko-38500

🐛 The bug

Problem

This library not working in association with @nuxt/content v3 and the website litteraly stoping to works

Reproducing

  • Installing @nuxt/content v3
  • Installing @nuxtjs/sitemap

You should see this kind of error message :

Could not resolve import "@nuxt/content/server" in /app/node_modules/@nuxtjs/sitemap/dist/runtime/server/routes/sitemap/nuxt-content-urls-v3.js using exports defined in /app/node_modules/@nuxt/content/package.json.

🛠️ To reproduce

https://stackblitz.com/edit/nuxt-starter-5vbdvm4s?file=nuxt.config.ts,package.json

🌈 Expected behavior

Should work and not break my website

ℹ️ Additional context

Solution

I've fixed my issue by changing an import in the file node_modules/@nuxtjs/sitemap/dist/runtime/server/routes/__sitemap__/nuxt-content-urls-v3.js

I have replace the import "@nuxt/content/server" by "@nuxt/content/nitro"

Cause

This commit : 0f05852

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions