N
Nuxt2mo ago
E81

Nuxt hanging?

Hi, anyone know why my application would be hanging, thinking it's Nuxt related but I'm unsure, there's no errors logged in the browser or console so I'm a bit stuck, all I did was go to sleep last night from it being in a working state, wake up, ran npm update and now its just doing this
No description
No description
6 Replies
kapa.ai
kapa.ai2mo ago
Hi @E81. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- There are several potential reasons why your Nuxt application might be hanging after running npm update, especially if it was working previously and now shows no errors in the browser or console: 1. Dependency Issues After Update: Updating dependencies can sometimes introduce breaking changes or incompatibilities, especially if a major version bump occurred. This is a common cause for unexpected hangs or failures after running npm update. 2. Build Hanging in Docker or Linux: If you are building or running your app in a Docker container or on a Linux environment, there are known issues where the build process can hang indefinitely. For example, when building for a different platform (e.g., --platform linux/amd64), the build can get stuck at the Vite SSR bundle step. In one case, switching from docker build to docker buildx build resolved the issue. Also, ensuring environment variables like HOST and PORT are set correctly can help in Nitro-based Nuxt 3 apps Nuxt build hanging in linux docker image. 3. File Watching and Resource Limits: On some systems, especially macOS or when using Vite, file watching can cause issues. Adjusting the Vite config to use polling can help:
export default defineNuxtConfig({
vite: { server: { watch: { usePolling: true, interval: 150 } } }
})

export default defineNuxtConfig({
vite: { server: { watch: { usePolling: true, interval: 150 } } }
})

This has helped some users resolve hanging or unresponsive development servers EBADF error with Nuxt 3 and Vite. 4. Component or File Naming Issues: There are cases where naming conventions (e.g., component names or filenames with HTTP method suffixes like upload.post.ts) can cause unexpected behavior or even crashes. Renaming such files to simpler names (e.g., upload.ts) has resolved issues for some users Nuxt 3 HMR Module not reloading changes, ERROR [unhandledRejection] read ECONNRESET. 5. No Error Output: If there are no errors in the console or browser, try enabling more verbose logging or debugging. You can enable sourcemaps for both server and client in your nuxt.config.ts:
export default defineNuxtConfig({
sourcemap: {
server: true,
client: true
}
})

export default defineNuxtConfig({
sourcemap: {
server: true,
client: true
}
})

This can help you get more detailed stack traces if something is failing silently Debugging. What you can try: - Revert your package.json to the previous working state and run npm install to see if the issue is related to the update. - Check for any breaking changes in your dependencies, especially Nuxt and related modules. - If using Docker, try docker buildx build instead of docker build. - Adjust your Vite config to use polling for file watching. - Check for unusual file or component naming. - Enable sourcemaps and increase logging verbosity. If none of these steps help, consider creating a minimal reproduction of your issue and sharing it with the Nuxt community on Discord or GitHub Discussions for more targeted help Getting Help. If you need more specific guidance, please provide additional details about your environment, recent changes, and any relevant logs. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai2mo ago
<@338971827000967170> Kapa.ai is still learning and improving, please let me know how I did by reacting below.
danielroe
danielroe2mo ago
this is a reported issue with the latest nuxt/cli on Windows. you can try pinning back to 3.28.0.
.FreaK.
.FreaK.2mo ago
I have the exact same issue. The dev server either doesn’t fully start or hangs. The terminal is also no longer usable and doesn’t react What does it mean „pinning back to 3.28“? Downgrade nuxt from v4 to v3.28?
danielroe
danielroe2mo ago
no, just @nuxt/cli
.FreaK.
.FreaK.2mo ago
For now I solved the issue downgrading from 4.13 to 4.12

Did you find this page helpful?