N
Nuxtβ€’2mo ago
Tahul

Very slow "Nuxt Nitro server" build

Hey πŸ™‚ Does any of you know a way to print debug for this step of my Nuxt build? "> Building Nuxt Nitro server (preset: node-server, compatibility date: 2024-07-29)" I tried debug: true at root of my nuxt.config, same in at root of nitro key in nuxt.config. Also tried DEBUG=* nr build I am experiencing a big increase in duration on that specific step of my build from recent updates and I can't identify where that is coming from. Thank you so much!
3 Replies
kapa.ai
kapa.aiβ€’2mo ago
Hi @Tahul. 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 knowledge sources provided, I can offer some insights into debugging the Nuxt Nitro server build process. However, it's important to note that the information available is limited and may not fully address your specific situation. To debug the Nuxt Nitro server build step, you can try the following: 1. Use the debug option in your nuxt.config.ts:
export default defineNuxtConfig({
debug: true
})

export default defineNuxtConfig({
debug: true
})

According to the Nuxt Configuration documentation, setting debug to true enables debug mode. This prints out hook names and timings on the server, and logs hook arguments in the browser. 2. Adjust the logLevel in the nitro configuration:
export default defineNuxtConfig({
nitro: {
logLevel: 3
}
})

export default defineNuxtConfig({
nitro: {
logLevel: 3
}
})

As seen in one of the GitHub issues, changing the logLevel can affect the build process and potentially provide more information GitHub Issue #27141. 3. Use the profile option in the webpack configuration:
export default defineNuxtConfig({
webpack: {
profile: true
}
})

export default defineNuxtConfig({
webpack: {
profile: true
}
})

According to the Nuxt Configuration documentation, this enables the profiler in webpackbar, which might provide additional insights into the build process. It's worth noting that recent updates to Nuxt might have introduced changes that affect build times. If you're experiencing a significant increase in build duration, it might be helpful to check the Nuxt GitHub repository for any recent issues or discussions related to build performance. If these options don't provide enough information to identify the cause of the slow build, you may need to consider reaching out to the Nuxt community or filing an issue on the Nuxt GitHub repository with detailed information about your project setup and the specific versions of Nuxt and its dependencies you're using. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.aiβ€’2mo ago
<@672762299370700814> Kapa.ai is still learning and improving, please let me know how I did by reacting below.
Mittchel
Mittchelβ€’2mo ago
use bun -b dev

Did you find this page helpful?