微信小程序-Unhandled promise rejection TypeError: Cannot read property ‘get‘ of undefined

简介: 微信小程序-Unhandled promise rejection TypeError: Cannot read property ‘get‘ of undefined

今天在敲代码的时候发现了一个诡异的bug

Unhandled promise rejection TypeError: Cannot read property ‘get’ of undefined

未处理的承诺拒绝类型错误:无法读取未定义的属性“get”

解决方法:换版本,或者把:

把上面引入的包 import { $http } from ‘@escook/request-miniprogram’ 换到下Vue下面来

相关文章
|
小程序 Java
小程序通过get请求提交数据到java后台
小程序通过get请求提交数据到java后台
257 0
|
JavaScript
VUE——filemanager-webpack-plugin报错TypeError: Cannot read property 'isFile' of undefined
VUE——filemanager-webpack-plugin报错TypeError: Cannot read property 'isFile' of undefined
594 0
|
前端开发 JavaScript
VUE——Uncaught (in promise) TypeError: Cannot read property '__esModule' of undefined
VUE——Uncaught (in promise) TypeError: Cannot read property '__esModule' of undefined
657 0
TypeError: Cannot set properties of undefined (setting ‘resdata‘),res定义数据出现的问题,定义的方法用this换成that
TypeError: Cannot set properties of undefined (setting ‘resdata‘),res定义数据出现的问题,定义的方法用this换成that
|
前端开发 小程序 API
【微信小程序】使用 Promise、async 和 await 将异步API 改写为同步
【微信小程序】使用 Promise、async 和 await 将异步API 改写为同步
855 0
|
前端开发
前后端数据交互-----ncaught (in promise) TypeError: this.registerAPI is not a function
前后端数据交互-----ncaught (in promise) TypeError: this.registerAPI is not a function
|
前端开发 JavaScript API
一文吃透 Promise 与 async/await,异步编程也能如此简单!建议收藏!
在前端开发中,异步编程至关重要。本文详解了同步与异步的区别,通过生活化例子帮助理解。深入讲解了 Promise 的概念、状态及链式调用,并引入 async/await 这一语法糖,使异步代码更清晰易读。还介绍了多个异步任务的组合处理方式,如 Promise.all 与 Promise.race。掌握这些内容,将大幅提升你的异步编程能力,写出更优雅、易维护的代码,助力开发与面试!
648 0
一文吃透 Promise 与 async/await,异步编程也能如此简单!建议收藏!
|
前端开发 JavaScript API
JavaScript异步编程:从Promise到async/await
JavaScript异步编程:从Promise到async/await
846 204
|
前端开发 JavaScript 开发者
Async 和 Await 是基于 Promise 实现
【10月更文挑战第30天】Async和Await是基于Promise实现的语法糖,它们通过简洁的语法形式,借助Promise的异步处理机制,为JavaScript开发者提供了一种更优雅、更易于理解和维护的异步编程方式。
574 1
|
前端开发
使用 async/await 结合 try/catch 处理 Promise.reject()抛出的错误时,有什么需要注意的地方?
使用 async/await 结合 try/catch 处理 Promise.reject()抛出的错误时,有什么需要注意的地方?
776 155