Replies: 1 comment 2 replies
-
Hello, I encountered as well this issue while replaying jasmine tests, when unmounting the app. Code was like : import { createApp, defineComponent, h } from 'vue';
const MyComponent = defineComponent({
render() {
return h('div', 'Hello, World!');
}
});
describe('MyComponent', () => {
it('should mount and unmount the component without errors', async () => {
const app = createApp(MyComponent);
const div = document.createElement('div');
const vm = app.mount(div);
await vm.$nextTick();
expect(div.textContent).toBe('Hello, World!');
// if following line is commented, no error is raised
app.unmount();
expect(div.textContent).toBe('');
});
}); |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I'm not sure if this is a vue devtools bug or not.
I'm using singleSPA and navigating between Microfrontend apps, each of those are vue with vue router and pinia.
Lately, an error had started to rise anytime I navigate between the apps. This error is rising from the devtools extension, and when the extension is disabled it does not occur.
The error is:
prepare.js:1 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'app')
at Object.get (prepare.js:1:41159)
at prepare.js:1:68716
at prepare.js:1:33623
at prepare.js:1:33615
It happens because VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD is undefined.
It only happens when I navigate away from a MF to another MF. If I refresh the page, the error does not happen.
This makes me think it is some sort of lifecycle related issue. I did not see this error in the past with the beta mode of devtools.
It is quite annoying, but I'm not really sure how to approach it.
Any ideas? Had anyone encountered a similar issue?
Beta Was this translation helpful? Give feedback.
All reactions