Version
3.2.31
Reproduction link
github.com
Steps to reproduce
PS:This project is the smallest project created by Vue cli tool. Please open it first and then decide whether to close it;
1:git clone https://github.com/peamed/vue-bug-1.git(已经是最小项目了,通过vue-cli创建的,没有业务代码);
2:npm install
3:npm run serve
4:打开本地服务链接:http://localhost:8080/
5:点击页面的home路由按钮
6:再点击页面的about路由按钮
7:再点击home路由按钮,回到home页面
8:再打开您的代码编辑工具,编辑HomeView.vue文件,如在mounted钩子函数中新增一行代码,然后点击保存运行
9:在浏览器中就会出现:runtime-core.esm-bundler.js?d2dd:5483 Uncaught (in promise) TypeError: parentComponent.ctx.deactivate is not a function
10:### Version
3.2.31
Reproduction link
github.com
Steps to reproduce
PS:This project is the smallest project created by Vue cli tool. Please open it first and then decide whether to close it;
1:git clone https://github.com/peamed/vue-bug-1.git(已经是最小项目了,通过vue-cli创建的,没有业务代码);
2:npm install
3:npm run serve
4:打开本地服务链接:http://localhost:8080/
5:点击页面的home路由按钮
6:再点击页面的about路由按钮
7:再点击home路由按钮,回到home页面
8:再打开您的代码编辑工具,编辑HomeView.vue文件,如在mounted钩子函数中新增一行代码,然后点击保存运行
9:在浏览器中就会出现:runtime-core.esm-bundler.js?d2dd:5483 Uncaught (in promise) TypeError: parentComponent.ctx.deactivate is not a function
What is expected?
It is expected that after using keepalive, HMR will not appear:
parentComponent.ctx.deactivate is not a function
What is actually happening?
runtime-core.esm-bundler.js?d2dd:38 [Vue warn]: Unhandled error during execution of scheduler flush. This is likely a Vue internals bug. Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core
at <KeepAlive include= ['Home'] >
at
at
warn @ runtime-core.esm-bundler.js?d2dd:38
logError @ runtime-core.esm-bundler.js?d2dd:212
handleError @ runtime-core.esm-bundler.js?d2dd:204
callWithErrorHandling @ runtime-core.esm-bundler.js?d2dd:158
flushJobs @ runtime-core.esm-bundler.js?d2dd:394
Promise.then (async)
queueFlush @ runtime-core.esm-bundler.js?d2dd:285
queueJob @ runtime-core.esm-bundler.js?d2dd:279
reload @ runtime-core.esm-bundler.js?d2dd:528
eval @ runtime-core.esm-bundler.js?d2dd:566
eval @ HomeView.vue?1da1:13
./src/views/HomeView.vue @ app.js:140
webpack_require @ app.js:304
_requireSelf @ app.js:599
apply @ app.js:1325
(anonymous) @ app.js:827
internalApply @ app.js:825
(anonymous) @ app.js:766
waitForBlockingPromises @ app.js:719
(anonymous) @ app.js:764
Promise.then (async)
(anonymous) @ app.js:763
Promise.then (async)
(anonymous) @ app.js:742
Promise.then (async)
hotCheck @ app.js:733
check @ dev-server.js?2743:14
eval @ dev-server.js?2743:55
emit @ events.js?b914:153
reloadApp @ reloadApp.js?7531:46
ok @ index.js?10ef:175
eval @ socket.js?d6e0:57
client.onmessage @ WebSocketClient.js?5586:50
runtime-core.esm-bundler.js?d2dd:5483 Uncaught (in promise) TypeError: parentComponent.ctx.deactivate is not a function
at unmount (runtime-core.esm-bundler.js?d2dd:5483:1)
at patch (runtime-core.esm-bundler.js?d2dd:4458:1)
at Object.sharedContext.activate (runtime-core.esm-bundler.js?d2dd:2405:1)
at processComponent (runtime-core.esm-bundler.js?d2dd:4894:1)
at patch (runtime-core.esm-bundler.js?d2dd:4489:1)
at ReactiveEffect.componentUpdateFn [as fn] (runtime-core.esm-bundler.js?d2dd:5107:1)
at ReactiveEffect.run (reactivity.esm-bundler.js?89dc:167:1)
at callWithErrorHandling (runtime-core.esm-bundler.js?d2dd:155:1)
at flushJobs (runtime-core.esm-bundler.js?d2dd:394:1)
The problem seems to have been discovered by many people:https://github.com/vuejs/core/pull/5165
What is expected?
It is expected that after using keepalive, HMR will not appear:
parentComponent.ctx.deactivate is not a function
What is actually happening?
runtime-core.esm-bundler.js?d2dd:38 [Vue warn]: Unhandled error during execution of scheduler flush. This is likely a Vue internals bug. Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core
at <KeepAlive include= ['Home'] >
at
at
warn @ runtime-core.esm-bundler.js?d2dd:38
logError @ runtime-core.esm-bundler.js?d2dd:212
handleError @ runtime-core.esm-bundler.js?d2dd:204
callWithErrorHandling @ runtime-core.esm-bundler.js?d2dd:158
flushJobs @ runtime-core.esm-bundler.js?d2dd:394
Promise.then (async)
queueFlush @ runtime-core.esm-bundler.js?d2dd:285
queueJob @ runtime-core.esm-bundler.js?d2dd:279
reload @ runtime-core.esm-bundler.js?d2dd:528
eval @ runtime-core.esm-bundler.js?d2dd:566
eval @ HomeView.vue?1da1:13
./src/views/HomeView.vue @ app.js:140
webpack_require @ app.js:304
_requireSelf @ app.js:599
apply @ app.js:1325
(anonymous) @ app.js:827
internalApply @ app.js:825
(anonymous) @ app.js:766
waitForBlockingPromises @ app.js:719
(anonymous) @ app.js:764
Promise.then (async)
(anonymous) @ app.js:763
Promise.then (async)
(anonymous) @ app.js:742
Promise.then (async)
hotCheck @ app.js:733
check @ dev-server.js?2743:14
eval @ dev-server.js?2743:55
emit @ events.js?b914:153
reloadApp @ reloadApp.js?7531:46
ok @ index.js?10ef:175
eval @ socket.js?d6e0:57
client.onmessage @ WebSocketClient.js?5586:50
runtime-core.esm-bundler.js?d2dd:5483 Uncaught (in promise) TypeError: parentComponent.ctx.deactivate is not a function
at unmount (runtime-core.esm-bundler.js?d2dd:5483:1)
at patch (runtime-core.esm-bundler.js?d2dd:4458:1)
at Object.sharedContext.activate (runtime-core.esm-bundler.js?d2dd:2405:1)
at processComponent (runtime-core.esm-bundler.js?d2dd:4894:1)
at patch (runtime-core.esm-bundler.js?d2dd:4489:1)
at ReactiveEffect.componentUpdateFn [as fn] (runtime-core.esm-bundler.js?d2dd:5107:1)
at ReactiveEffect.run (reactivity.esm-bundler.js?89dc:167:1)
at callWithErrorHandling (runtime-core.esm-bundler.js?d2dd:155:1)
at flushJobs (runtime-core.esm-bundler.js?d2dd:394:1)
The problem seems to have been discovered by many people:https://github.com/vuejs/core/pull/5165