No Source Code found for Nuxt Dev Tools.

I have migrated to Nuxt 4 and am using the nuxt seo tool to check the links but I get this message on the Dev Tool "No Source Code found" I have added the srcDir path as the new app dir in the Nuxt Config but I am still getting this message. srcDir: "app/",
No description
2 Replies
kapa.ai
kapa.ai4w ago
Hi @Sagar Kapoor. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- The message "No Source Code found" in Nuxt DevTools after migrating to Nuxt 4 is likely related to the new directory structure introduced in Nuxt 4. In Nuxt 4, the default source directory is now app/, and most of your application code (including pages, components, etc.) should be inside this app/ directory. Setting srcDir: "app/" in your nuxt.config is correct for this structure Nuxt 4 srcDir docs. However, if you are still seeing "No Source Code found" in DevTools, here are a few things to check: 1. Directory Structure:
Ensure your project structure matches the expected Nuxt 4 layout, with all your main folders (assets, components, pages, etc.) inside the app/ directory, and nuxt.config.ts at the project root (not inside app/):
- app/
- assets/
- components/
- pages/
- ...
- nuxt.config.ts
- package.json

- app/
- assets/
- components/
- pages/
- ...
- nuxt.config.ts
- package.json

2. DevTools Version:
Make sure you are using a compatible version of Nuxt DevTools (v2+ for Nuxt 4). You can install or update it with:
npm i -D @nuxt/devtools

npm i -D @nuxt/devtools

And enable it in your nuxt.config:
export default defineNuxtConfig({
devtools: { enabled: true }
})

export default defineNuxtConfig({
devtools: { enabled: true }
})

Or via the CLI:
npx nuxi@latest devtools enable

npx nuxi@latest devtools enable

Nuxt DevTools Getting Started 3. Restart the Dev Server:
After making changes to your directory structure or config, restart your Nuxt dev server to ensure changes are picked up. 4. Check for Global/Old DevTools Installs:
If you previously installed @nuxt/devtools globally, it may cause conflicts. Uninstall any global versions:
npm uninstall -g @nuxt/devtools

npm uninstall -g @nuxt/devtools

And check for any lingering references in your user directory (such as a .nuxtrc file) and remove them if necessary [GitHub Issue Reference]. 5. Nuxt SEO Tool:
If the SEO tool is expecting the old directory structure, ensure it is updated for Nuxt 4 compatibility. If you have confirmed all the above and the issue persists, it may be a bug or a compatibility issue with the DevTools or a related module. In that case, consider opening an issue on the Nuxt DevTools GitHub with details about your setup and directory structure. Summary:
- Use the new app/ directory for your source code. - Set srcDir: "app/" in nuxt.config. - Ensure DevTools is installed locally and enabled. - Remove any global or old DevTools installations. - Restart your dev server after changes. If you follow these steps and still see "No Source Code found," the knowledge sources do not provide a more specific solution, and you may need to seek further support from the Nuxt community or GitHub issues. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai4w ago
<@565461230060306432> Kapa.ai is still learning and improving, please let me know how I did by reacting below.

Did you find this page helpful?