我正在创建一个登录页面和我的 API 客户端类。我编写了这段代码,将后端的响应发送到我的登录前端。
static async signIn(user, pass){
const response = await axios
.get('http://localhost:8080/signIn', {
username: user,
password: pass,
})
return response.data;
}
在我写完之后,我的服务器上立即弹出了这个错误消息:
类型错误:无法读取未定义的属性“原型”
(anonymous function)
C:/Users/Amman/dunder-mifflin/node_modules/express/lib/response.js:42
39 | * @public
40 | */
41 |
> 42 | var res = Object.create(http.ServerResponse.prototype)
43 |
44 | /**
45 | * Module exports.
View compiled
我不知道是什么原因造成的,或者我是否输入错误,我尝试寻找修复它的方法,但它仍然给我同样的错误。有什么办法可以解决这个问题吗?