-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot set properties of null (setting 'textContent') #7921
Comments
Does also not work on Windows+Chrome |
Does also not work on Mac-OS+Chrome |
This comment was marked as duplicate.
This comment was marked as duplicate.
The reason is that, during the first mount, the |
This comment was marked as duplicate.
This comment was marked as duplicate.
Thanks for investigating. Sounds like this bug affects every vite+vue project that import components with slots from a node module. It also seems to be present in older versions I tried. I'm also not sure which repo this bug belongs to. Do you think I should open an issue on vite-plugin-vue? |
I think vite-plugin-vue has successfully notified Vue to update this file, but it cannot know whether a js file is a Vue component or not. Therefore, this issue is irrelevant to it. For Vue, it should handle this situation with additional processing. I will submit a PR for this issue. |
Vue version
3.2.47
Link to minimal reproduction
https://stackblitz.com/edit/vitejs-vite-pe69dq?file=src/App.vue
Steps to reproduce
What is expected?
HMR should not crash when working with external components
What is actually happening?
Changes to template are not visible without a full reload, and I get the following error in browser console:
System Info
Tested in Google Chrome and Firefox, on Ubuntu 22.10
Any additional comments?
I run into this bug a lot while working on applications that use components imported from npm component libraries.
This closed thread is also possibly related to this issue: #4707
The text was updated successfully, but these errors were encountered: