gpt4 book ai didi

VueBUG——Uncaught Error: Provided config url is not valid

转载 作者:知者 更新时间:2024-03-13 08:00:19 25 4
gpt4 key购买 nike

Uncaught Error: Provided config url is not valid

记录一个BUG,因为之前vue项目中在main.js使用了Vue.use(axios)而出现的

错误详情

Uncaught Error: Provided config url is not valid
    at Axios.request (Axios.js?0a06:40:1)
    at wrap (bind.js?1d2b:9:1)
    at Function.Vue.use (vue.runtime.esm.js?2b0e:5123:1)
    at eval (main.js?56d7:11:1)
    at Module../src/main.js (app.js:1088:1)
    at __webpack_require__ (app.js:854:30)
    at fn (app.js:151:20)
    at Object.1 (app.js:1113:18)
    at __webpack_require__ (app.js:854:30)
    at checkDeferredModules (app.js:46:23)

解决方法:axios不需要install,所以Vue.use(axios)是非法的。

还有一种方式是

import axios from 'axios'
import VueAxios from 'vue-axios'

Vue.use(VueAxios,axios);

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com