关注
码龄
粉丝数
原力等级 --
被采纳
被点赞
采纳率
m0_72070348
2024-09-10 11:21
采纳率: 100%
浏览 61
首页
前端
已结题
vue3中使用axios报错Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'get')
vue.js
javascript
前端
为什么正确安装和注册了axios,却使用不了axios的get呢?
收起
写回答
好问题
0
提建议
关注问题
微信扫一扫
点击复制链接
分享
邀请回答
编辑
收藏
删除
收藏
举报
1
条回答
默认
最新
关注
码龄
粉丝数
原力等级 --
被采纳
被点赞
采纳率
波塞冬的祝福
2024-09-10 11:33
关注
不是这么引入的。
本回答被题主选为最佳回答
, 对您是否有帮助呢?
本回答被专家选为最佳回答
, 对您是否有帮助呢?
本回答被题主和专家选为最佳回答
, 对您是否有帮助呢?
解决
无用
评论
打赏
微信扫一扫
点击复制链接
分享
举报
评论
按下Enter换行,Ctrl+Enter发表内容
查看更多回答(0条)
向“C知道”追问
报告相同问题?
提交
关注问题
Vue
报错
:
Unc
aught
(in
promise
)
TypeError
: Cannot
read
properties
of
undefined
(
read
ing
‘cancelToken‘)
2022-12-27 13:51
Ll.l.的博客
解决方法:在
axios
请求拦截器
中
添加 :return config
Vue
报错
:
Unc
aught
(in
promise
)
TypeError
: Cannot
read
properties
of
undefined
(
read
ing
‘protocol‘)
2022-06-29 21:08
thorntree668的博客
Vue
报错
:
Unc
aught
(in
promise
)
TypeError
: Cannot
read
properties
of
undefined
(
read
ing
'protocol')
解决
Unc
aught
(in
promise
)
TypeError
: Cannot
read
properties
of
undefined
(
read
ing
‘id‘)
报错
2023-06-28 18:03
前端百草阁的博客
前期上网查以为是
axios
异步请求的问题,后来一直尝试发现是访问对象的问题,每个人触发
报错
的前提都不相同,看看是否适合你!
Vue
报错
(
Unc
aught
(in
promise
)
TypeError
: Cannot
read
properties
of
undefined
(
read
ing
‘get‘))
2022-03-30 21:12
米奇&米奇的博客
vue
的常见
报错
1:
报错
信息如下: 原因是因为
axios
没有成功的引入,导致的。 2:错误的引入如下 3:正确的引入如下
html发开引入elementui的cdn
报错
,
Unc
aught
TypeError
: Cannot
read
properties
of
undefined
(
read
ing
‘prototype‘
2024-11-01 11:35
来啦来啦~的博客
index.js:1
Unc
aught
TypeError
: Cannot
read
properties
of
undefined
(
read
ing
'prototype') at Module.
Vue
用
axios
时
报错
:
Unc
aught
(in
promise
)
TypeError
: Cannot
read
properties
of
undefined
(
read
ing
‘protocol‘)
2022-04-19 13:37
MartinYangHJ的博客
import
Vue
from '
vue
' import
axios
from '
axios
' ...
Vue
项目
中
使用
axios
时,按照上述方式将
axios
以插件的方式来
使用
就会
报错
,如下: 出现这个错误的原因就是将
axios
当做
Vue
的插件
使用
了,这是错误的,正确的做法.
使用
axios
报错
:
Unc
aught
TypeError
: Cannot set
properties
of
undefined
(sett
ing
‘baseURL‘)
2023-05-30 17:19
Jackson_Peng的博客
先
使用
npm uninstall
axios
卸载当前
axios
版本。在
使用
axios
的时候,因为版本的原因会在页面
中
出现这种错误。在
使用
npm install
axios
@ 0.21.1 -s。我们需要指定
axios
的版本,可以解决这个问题!
vue
3
中
遇到的问题:
Unc
aught
(in
promise
)
TypeError
: Cannot
read
properties
of
undefined
(
read
ing
‘name‘)
2023-02-03 15:08
老板的万能扳手的博客
Unc
aught
(in
promise
)
TypeError
: Cannot
read
properties
of
undefined
(
read
ing
'name')
axios
报错
Unc
aught
(in
promise
)
TypeError
: Cannot set
properties
of
undefined
(sett
ing
‘wenben‘) at
2022-04-26 18:33
沐雨~橙风的博客
axios
中
报错
该问题是 this在网络请求的异步代码块
中
的this与当前数据所在类的this不是一个作用域,所以会导致
undefined
。 可以
使用
箭头函数解决
Unc
aught
(in
promise
)
TypeError
: Cannot
read
properties
of
undefined
(
read
ing
‘data‘)的
报错
2022-06-14 21:27
._安静的博客
报错
如下 找了一圈,返回数据没问题,语法啥的也没问题原因:在
使用
调this.checkLogin()时没有返回值。 解决:加上return就行了
没有解决我的问题,
去提问
向专家提问
向AI提问
付费问答(悬赏)服务下线公告
◇ 用户帮助中心
◇ 新手如何提问
◇ 奖惩公告
问题事件
关注
码龄
粉丝数
原力等级 --
被采纳
被点赞
采纳率
系统已结题
9月18日
关注
码龄
粉丝数
原力等级 --
被采纳
被点赞
采纳率
已采纳回答
9月10日
关注
码龄
粉丝数
原力等级 --
被采纳
被点赞
采纳率
创建了问题
9月10日