Uncaught (in promise) TypeError: Cannot read properties of null (reading 'en')
时间: 2023-10-15 20:23:43 浏览: 154
Vue报错:Uncaught TypeError: Cannot assign to read only property’exports‘ of object’#Object‘的解决方法
这个报错信息"Uncaught (in promise) TypeError: Cannot read properties of null (reading 'en')"意味着在一个Promise对象中无法读取null的'innerHTML'属性。根据引用和引用的信息,这个报错通常发生在尝试将HTML代码插入到一个空元素中,或者在页面还未完全加载时尝试访问元素。一种解决方法是确保在执行插入操作之前,目标元素已经被正确地创建并添加到DOM树中。另外,也可以将相关的代码放在页面加载完成后再执行,可以使用window.onload事件或将script标签放在body结束标签之前。这样可以确保页面中的元素已经被正确创建并可以访问。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [关于js报错信息Uncaught TypeError: Cannot read properties of null (reading ‘appendChild‘);](https://blog.csdn.net/eclipse_ali/article/details/120490833)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *2* [Uncaught TypeError: Cannot set properties of null (setting ‘innerHTML‘)](https://blog.csdn.net/weixin_52461860/article/details/124849314)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文