Could not load @nuxtjs/sitemap. Is it installed?
I have started a new fresh project, install
@nuxtjs/sitemap
add it to nuxt.config.ts
modules and then, when I start my application I have this error.
6 Replies
Hi @David. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
Based on the information provided in the knowledge sources, it appears that you're encountering an issue with the @nuxtjs/sitemap module in a Nuxt 3 project. The error you're seeing suggests that the module is not properly installed or configured. Here's what you need to know:
1. Version Compatibility: The @nuxtjs/sitemap module version 2.x is specifically for Nuxt 2. For Nuxt 3, you need to use a different module.
2. Nuxt 3 Solution: For Nuxt 3, it's recommended to use the nuxt-simple-sitemap module instead of @nuxtjs/sitemap.
To resolve this issue, follow these steps:
1. Uninstall the @nuxtjs/sitemap module:
2. Install the nuxt-simple-sitemap module:
3. Update your
nuxt.config.ts
file to use the new module:
4. Configure the sitemap as needed according to the nuxt-simple-sitemap documentation.
By making these changes, you should be able to generate a sitemap in your Nuxt 3 project without encountering the "Could not load @nuxtjs/sitemap" error.
For more detailed information on using sitemaps with Nuxt 3, you can refer to the Stack Overflow post which discusses this issue.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------<@556083802628161546> Kapa.ai is still learning and improving, please let me know how I did by reacting below.
I'm having the same issue, and other people have reported this too.
It was flagged as fixed yesterday https://discord.com/channels/473401852243869706/1330449872461103175/1330900666369179699 but I don't think it is?
The issue is clearly not fixed, I have the latest version
GitHub
fix: missing @nuxt/content dependency · Issue #184 · nuxt-modules/r...
🐛 The bug version 5.2.0 misses @nuxt/content runtime dependency, leading to the following loading error : Could not load [...] node_modules/@nuxtjs/robots/dist/module.mjs. Is it installed? 🛠️ To re...
If you still have issues please confirm you're using the latest version (
nuxi upgrade --force
can help) and open an issue if it's still throwing an error