N6YTZFOH.js:920 Uncaught (in promise) Error: Cannot read properties of undefined (reading '_RUNTIME_')
时间: 2023-11-01 21:56:01 浏览: 45
根据提供的引用内容,出现 "Uncaught (in promise) Error: Cannot read properties of undefined (reading '_RUNTIME_')" 错误是由于在Promise中使用.catch()方法时未正确处理错误导致的。在第一个引用中,通过在Promise的.catch()方法中添加空的错误处理函数来解决了错误。
因此,您可以尝试通过在Promise链式调用的.catch()方法中添加空的错误处理函数来解决此错误。具体做法如下:
```
().then(() => {
// 执行操作
}).catch(() => {});
```
这样做可以捕获并处理错误,避免在控制台中显示未处理的错误信息。希望对您有所帮助!
相关问题
ZSVJPCOI.js:920 Uncaught (in promise) Error: Cannot read properties of undefined (reading '_RUNTIME_') at wrappedSendMessageCallback
引用:这个错误信息表明在ZSVJPCOI.js文件的第920行发生了一个未捕获的错误,错误类型是Error,错误内容是无法读取未定义对象的属性"_RUNTIME_"。这个错误<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [Uncaught (in promise) TypeError: Cannot read properties of undefined (reading ‘__composer‘)](https://blog.csdn.net/wangqingbo0829/article/details/131357856)[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_2"}}] [.reference_item style="max-width: 50%"]
- *3* [小程序报错 WAService.js:3 Uncaught Error: module "src/utils/utils.js" is not defined](https://download.csdn.net/download/weixin_38667849/16215515)[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_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
SvgPanZoom.vue:4 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading '_c')
根据引用\[1\]和引用\[2\]的内容,问题出现在main.js文件中对axios的引用方式上。正确的写法是使用import语句引入axios,并将其添加到Vue的原型上。正确的写法如下:
```javascript
import axios from "axios";
Vue.prototype.axios = axios;
```
而错误的写法是使用Vue.use()加载axios插件,这是不支持的。因此,你需要将错误的代码修改为正确的写法。
另外,根据引用\[3\]的内容,问题可能还与SvgPanZoom.vue文件中的代码有关。具体来说,错误信息中提到了'_c'属性的读取错误。这可能是由于在SvgPanZoom.vue文件中使用了未定义的变量或方法导致的。你需要检查SvgPanZoom.vue文件的第4行代码,确保没有对未定义的'_c'属性进行操作。
综上所述,你需要修改main.js文件中对axios的引用方式,并检查SvgPanZoom.vue文件中的代码,确保没有使用未定义的变量或方法。这样可以解决SvgPanZoom.vue:4 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading '_c')的问题。
#### 引用[.reference_title]
- *1* *2* [Vue报错: Uncaught (in promise) TypeError: Cannot read properties of undefined (reading ‘protocol‘)](https://blog.csdn.net/weixin_55971433/article/details/125529573)[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^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item]
- *3* [Vue报错:Uncaught (in promise) TypeError: Cannot read properties of undefined (reading ‘cancelToken...](https://blog.csdn.net/weixin_42343966/article/details/128454897)[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^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
相关推荐
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)