core icon indicating copy to clipboard operation
core copied to clipboard

Fix: HMR on keepalive components caused error (fix #5073)

Open Chenshyboy opened this issue 3 years ago • 10 comments

close #5073

Chenshyboy avatar Dec 24 '21 10:12 Chenshyboy

Found this PR because yes, indeed, HMR is broken if I add keep-alive on the router-view.

That's the error: image

I haven't tried applying the fix proposed in this PR, but 🤞🏼 that it's about the same issue :)

AlexDaniel avatar Jan 23 '22 13:01 AlexDaniel

Whether the problem has been solved and repaired, and whether the latest version has been solved. At present, I use "Vue": "^ 3.2.13"; The problem still exists

peamed avatar Mar 06 '22 02:03 peamed

Can this get some attention, please? Working without HMR is extremely annoying.

AlexDaniel avatar Apr 24 '22 10:04 AlexDaniel

@yyx990803 This problem has existed for a long time. there is a complete test case in hmr.spec.ts,at present, the latest version of Vue test cannot pass, although it is a small bug,but it is really annoying in development. please pay some attention to it, Thank you

Math-chen avatar May 07 '22 05:05 Math-chen

Deploy Preview for vue-next-template-explorer ready!

Name Link
Latest commit 7f3a64e0e50ec9887742c69db6b0a3daad8ffd80
Latest deploy log https://app.netlify.com/sites/vue-next-template-explorer/deploys/627615e2c7c5b300088cbe8f
Deploy Preview https://deploy-preview-5165--vue-next-template-explorer.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

netlify[bot] avatar May 07 '22 06:05 netlify[bot]

Deploy Preview for vuejs-coverage ready!

Name Link
Latest commit 7f3a64e0e50ec9887742c69db6b0a3daad8ffd80
Latest deploy log https://app.netlify.com/sites/vuejs-coverage/deploys/627615e2b3c7da00085f88e4
Deploy Preview https://deploy-preview-5165--vuejs-coverage.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

netlify[bot] avatar May 07 '22 06:05 netlify[bot]

Deploy Preview for vue-sfc-playground ready!

Name Link
Latest commit 7f3a64e0e50ec9887742c69db6b0a3daad8ffd80
Latest deploy log https://app.netlify.com/sites/vue-sfc-playground/deploys/627615e2d1fdbb000894a878
Deploy Preview https://deploy-preview-5165--vue-sfc-playground.netlify.app/
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

netlify[bot] avatar May 07 '22 06:05 netlify[bot]

@yyx990803 尝试了3.2.37版本,这个问题依然存在,希望能在下个版本中看到它被修复了,虽然刷新一下浏览器,它就没问题了,但每次热更它总出现在控制台里,很烦人, #4387 #5073 都是这个问题,谢谢了。

mutolee avatar Jul 03 '22 05:07 mutolee

同样的[email protected]版本,同样的报错信息,使用vite构建,热更新无法使用

feiyayshx avatar Aug 02 '22 02:08 feiyayshx

The first reload didn't trigger the onDeactivated.

KID-joker avatar Aug 08 '22 09:08 KID-joker

I find that this problem does not occur when using the option API. Only when using the setup API will the hot update fail!

boundless-qi avatar Aug 19 '22 03:08 boundless-qi

I tried [email protected] version and still have this error

xuxing409 avatar Sep 27 '22 08:09 xuxing409

实测3.2.45已经没有提示该错误

pettyferlove avatar Dec 09 '22 09:12 pettyferlove

Thanks for your PR, but this issue has been fixed in v3.2.45, see #7049.

zhangzhonghe avatar Dec 09 '22 11:12 zhangzhonghe

still getting this error on 3.2.45

teajaysee avatar Dec 09 '22 11:12 teajaysee

still getting this error on ^3.2.47

cn-2k avatar Apr 05 '23 12:04 cn-2k

still getting this error on ^3.3.4

INSIinc avatar May 28 '23 12:05 INSIinc