Closed
Description
Version
2.6.9
Reproduction link
Vue:
Nuxt:
Steps to reproduce
Vue:
- Add an async component with a delay/timeout
- When the real component is rendered and the loading and error components never showed, the timeouts are not cleared, but will be triggered.
Nuxt:
- Add an async component with a long timeout (10 Seconds) - https://github.com/ahus1/nuxt-async-timeout/commit/ebabb1f2b877db3ccb8dfc9af57b06ad2e435dd1
- run "npm run generate"
What is expected?
Vue:
- When component is rendered, the timeout and delay timeouts should be cleared if the haven't fired yet.
Nuxt:
- generation should complete without an error
What is actually happening?
Vue:
- Timeouts for delay and timeout fire after the component has been rendered.
Nuxt:
- node blocks after rendering. Nuxt presents and error message:
The command 'nuxt generate' 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
This happens both for timeout and loading elements. I'm about to submit a PR submitted as #9649.
Metadata
Metadata
Assignees
Labels
No labels