nuxt: How do i fix Nuxt Warning 'nuxt build finished but did not exit after 5s'?
Version
Reproduction link
Steps to reproduce
i thinks it happen when migrate to nuxt 2.x version from any version
What is expected ?
not appearing ⚠ Nuxt Warning
What is actually happening?
╭───────────────────────────╮
│ │
│ ⚠ Nuxt Warning │
│ │
│ The command ‘nuxt build’ finished but did not exit after 5s │
│ │
│ This is most likely not caused by a bug in Nuxt.js │
│ │
│ Make sure to cleanup all timers and listeners you or your │
│ plugins/modules start. │
│ Nuxt.js will now force exit │
│ │
│ DeprecationWarning: Starting with Nuxt version 3 this will . │
│ be a fatal error │
│
╰───────────────────────────╯
Additional comments?
i have no idea from warning message Make sure to cleanup all timers and listeners you or your plugins/modules start.
i already check out pluggins and module directory i wrote before, but there’s no timer/interval expressions.
how can i found cause of this things?
<div align="right">This bug report is available on Nuxt community (#c9167)</div>About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 3
- Comments: 17 (3 by maintainers)
The issues comes because we actually import the
serverMiddlewarewhen runningnuxt build.What you can do instead is to create a module for it @highalps
~/nuxt.config.js:~/modules/api/index.js:~/api/index.js:You can learn more on https://nuxtjs.org/guide/modules
We are talking with the core team to work on a solution to avoid includes the serverMiddleware when running
nuxt build.But mostly, we will soon have Nuxt services allowing to create your API in your Nuxt app without having to add serverMiddleware (better for perf & memory management + hot reloading).
Hard to tell w/o the actual code 😉
@Atinux Just create new nuxt app and add:
After the second build try you will get the same warning
UPD: Turning off
paralleldisables this warningwhen i use parallel in build ,i get this issue
I started getting this issue once I enabled
HardSourceWebpackPluginin production build@arnabrahman Obviously yes, but how can I fix it?