(Relates to: VueJS 2.x)
I just modified a VueJS project and received the following warning:
[Vue warn]: Error in mounted hook: "TypeError: Cannot read property 'id' of null" found in ---> <Anonymous> <Root>
I’d split code from 1 JavaScript (JS) and 1 corresponding HTML page into 2 JS and HTML files.
After refreshing the page, I received the above error.
There was no problem in my code.
The problem was I needed to do a hard refresh in the browser get and execute and the new and updated files.