首页 新闻 会员 周边 捐助

我在获取axios的数据时出现了这个问题,有人能解答么,万分感谢

0
[待解决问题]
  • 正在执行任务: npm run dev

my-project@1.0.0 dev
webpack-dev-server --inline --progress --config build/webpack.dev.conf.js

(node:8311) [DEP0111] DeprecationWarning: Access to process.binding('http_parser') is deprecated.
(Use node --trace-deprecation ... to show where the warning was created)
13% building modules 27/68 modules 41 active ...Users/zhuyishu/my-project/src/App.vue{ parser: "babylon" } is deprecated; we now treat it as { parser: "babel" }.
94% asset optimization

ERROR Failed to compile with 2 errors 01:09:43

error in ./node_modules/axios/lib/platform/index.js

Module parse failed: Unexpected token (5:2)
You may need an appropriate loader to handle this file type.
|
| export default {
| ...utils,
| ...platform
| }

@ ./node_modules/axios/lib/defaults/index.js 8:0-44
@ ./node_modules/axios/lib/axios.js
@ ./node_modules/axios/index.js
@ ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/views/tlias/EmpView.vue
@ ./src/views/tlias/EmpView.vue
@ ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/App.vue
@ ./src/App.vue
@ ./src/main.js
@ multi (webpack)-dev-server/client?http://localhost:7070 webpack/hot/dev-server ./src/main.js

error in ./node_modules/axios/lib/core/mergeConfig.js

Module parse failed: Unexpected token (6:69)
You may need an appropriate loader to handle this file type.
| import AxiosHeaders from "./AxiosHeaders.js";
|
| const headersToObject = (thing) => thing instanceof AxiosHeaders ? { ...thing } : thing;
|
| /**

@ ./node_modules/axios/lib/axios.js 6:0-48
@ ./node_modules/axios/index.js
@ ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/views/tlias/EmpView.vue
@ ./src/views/tlias/EmpView.vue
@ ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/App.vue
@ ./src/App.vue
@ ./src/main.js
@ multi (webpack)-dev-server/client?http://localhost:7070 webpack/hot/dev-server ./src/main.js

WhyNo?的主页 WhyNo? | 菜鸟二级 | 园豆:202
提问于:2024-03-21 01:19
< >
分享
所有回答(1)
0

搜了下报错信息,看看这篇帖子https://www.cnblogs.com/tingorb/p/17957169,希望能给到你帮助。

九月里 | 园豆:202 (菜鸟二级) | 2024-03-21 13:34
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册