vue2 nuxt打包时间超过1小时异常

使用  npm run generate

打包时提示:

The command 'nuxt generate' finished but did not exit after 5s   ││   This is most likely not caused by a bug in Nuxt  ││   Make sure to cleanup all timers and listeners you or your                  ││   plugins/modules start.   ││   Nuxt will now force exit  ││ ││   DeprecationWarning: Starting with Nuxt version 3 this will be a fatal ││   error

一般情况是页面存在定时器没有代码销毁导致,

比如存在 setTimeout定时器,需要在 页面 destroyed 或 beforeDestroy 时销毁:  clearTimeout(this.myTempTimer)

setInterval 定时器也要销毁: clearInterval(priceInterval)

 

posted @ 2024-03-18 17:47  study_php_java_C++  阅读(42)  评论(0编辑  收藏  举报