• 카테고리

    질문 & 답변
  • 세부 분야

    프론트엔드

  • 해결 여부

    해결됨

에러 도와주세요...

22.02.17 19:28 작성 조회수 354

1

 created() {
    const user = this.$route.params.id;

    // this.$store.dispatch("FETCH_USERS", user);
    axios()
      .get(`https://api.hnpwa.com/v0/user/${user}.json`)
      .then((e) => {
        this.dodo = e.data;
      })
      .catch((e) => {
        console.log(e);
      });
},
뭐가 잘못된건지 모르겟습니다.. 아래는 에러코드에요.
 
Axios.js?0a06:40 Uncaught (in promise) Error: Provided config url is not valid at Axios.request (Axios.js?0a06:40:1) at wrap (bind.js?1d2b:9:1) at Proxy.created (UserView.vue?32f5:18:1) at callWithErrorHandling (runtime-core.esm-bundler.js?5c40:155:1) at callWithAsyncErrorHandling (runtime-core.esm-bundler.js?5c40:164:1) at callHook (runtime-core.esm-bundler.js?5c40:2965:1) at applyOptions (runtime-core.esm-bundler.js?5c40:2867:1) at finishComponentSetup (runtime-core.esm-bundler.js?5c40:7159:1) at setupStatefulComponent (runtime-core.esm-bundler.js?5c40:7071:1) at setupComponent (runtime-core.esm-bundler.js?5c40:7001:1)
 
 
 
 
 
 

답변 1

답변을 작성해보세요.

0

axios().get()이 아니라 axios.get() 으로 하셔야 해요 :)

rud1505님의 프로필

rud1505

질문자

2022.02.17

앜ㅋㅋ 감사합니다...