小编tia*_*eco的帖子

反应本机错误:createError 中的 node_modules/axios/lib/core/createError.js:16:24

我写了这个函数

fetchWeather(){
    axios.get(`http://api.openweathermap.org/data/2.5/forecast/daily?q=${this.state.city},uk&APPID=3a31a881817a041a63eac1c1bbbba705`)
    .then((response)=>{
      this.setState({report:response.data})
    }).catch((error)=>console.log(error))
  }
Run Code Online (Sandbox Code Playgroud)

并得到这个错误:

createError 中的 node_modules/axios/lib/core/createError.js:16:24 - Settle 中的 node_modules/axios/lib/core/settle.js:19:6 - ...来自框架内部的另外 10 个堆栈帧

reactjs

6
推荐指数
1
解决办法
2万
查看次数

标签 统计

reactjs ×1