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 @   study_php_java_C++  阅读(61)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· DeepSeek 开源周回顾「GitHub 热点速览」
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
点击右上角即可分享
微信分享提示