前端哥

vue axios 引用报错Module parse failed: Unexpected token (5:2) You may need an appropriate loader to hand

2024-01-25试了很久,后来看到网上另一个同类的报错,他给出的原因是引用的第三方组件的某个版本有问题,故:我尝试更换axios 为低版本再试试;查看此时我安装的是默认最新版的axios1.6.2;尝试将版本降低为1.5.0后,此问题解决;尝试了无论是在components内import,还是在main.js内全局引用都会报这个错误;在写一个前端demo的时候,发现import axios from ‘axios’,网上查了很久,也尝试写自定义vue.config.js,但仍然报此错误;_module parse failed: unexpected token (5:2) you may need an appropriate load

https://www.qianduange.cn//article/331.html 分类:前端知识

71条数据,当前8/8

最近搜索

会员中心 联系我 留言建议 回顶部