• 로그인
  • 장바구니에 상품이 없습니다.

home2 게시판 Node.js, Express 게시판 firebase 설치

firebase 설치

  • 이 주제에는 13개 답변, 2명 참여가 있으며 codingapple3 년 전에 전에 마지막으로 업데이트했습니다.
10 글 보임 - 1 에서 10 까지 (총 14 중에서)
  • 글쓴이
  • #39264

    유용환
    참가자
    vue 에 파이어베이스를 설치를 했는데 
    ./src/components/SignUp.vue Module Error (from ./node_modules/eslint-loader/index.js):  C:\Users108\Desktop\밑절미1\share\src\components\SignUp.vue  44:7 error 'firebase' is not defined no-undef
    이런 오류가 나옵니다.
    main.js에 
    
    import firebase from "firebase/app";
    import "firebase/firestore";
    const firebaseConfig = {
        authDomain: "twin-fish-26f8d.firebaseapp.com",
        projectId: "twin-fish-26f8d",
        storageBucket: "twin-fish-26f8d.appspot.com",
        messagingSenderId: "237035933535",
        appId: "1:237035933535:web:8cacbe15ebc350b281b0ea",
      };
      firebase.initializeApp(firebaseConfig);
      export const db = firebase.firestore();
    createApp(App).use(router).use(store).mount('#app') 
    
    이렇게 해놓았습니다.
    
    
    #39270

    codingapple
    키 마스터
    npm으로 설치할때 8버전으로 설치하셨나요
    #39286

    유용환
    참가자
    강의 밑에 나와있는 뷰 를 사용할때 npm install firebase@8.6.5
    이렇게 하면 firebase' is not defined no-undef 이 에러가 안나오는데 조금 수정하고 다시 저장하고 실행하려고 하면
    다시 위의 오류가 다시 나옵니다. 혹시나 해서 다시 뷰의 파이어베이스를 npm install firebase@8.6.5 으로 실행하고 해보면
    오류는 안나오는데 파이어베이스에 적용이 안되어있습니다.
    어떤것이 문제인가요
    #39317

    codingapple
    키 마스터
    에디터 껐다가 다시 띄우거나 하면 될수도 있습니다
    #39350

    유용환
    참가자
    껐다가 켜도 수정하고 다시 실행시키면 
    ./src/components/SignUp.vue Module Error (from ./node_modules/eslint-loader/index.js):  C:\Users108\Desktop\밑절미1\share\src\components\SignUp.vue  46:7 error 'firebase' is not defined no-undef
    이런에러가 나오는데 index.js에 관련 코드를 안넣어 놓아서 그런건가요
    
    
    #39386

    codingapple
    키 마스터
    SignUp.vue에 firebase 어쩌구 코드 작성하셨나요 그걸 지웁시다
    #39402

    유용환
    참가자
    SignUp.vue에 
    methods : {
        sign_up(){
          
          firebase.auth().createUserWithEmailAndPassword(this.input_email, this.input_password).then(()=>{
            alert('회원가입 완료!')
          }
          )
    }
      }
    이것을 넣었는데 파이어베이스를 사용안하면 어떻게 사용해야하나요 회원가입 기능인데 다른 방법이 있나요
    
    
    #39421

    codingapple
    키 마스터
    import firebase from "firebase/app" 그 파일 상단에 추가합시다
    #39545

    유용환
    참가자
    <template>
      <div class="signup__container">
      <div class="container__child signup__form">
        <form action="#">
          
          <div class="form-group">
            <label for="email">이메일</label>
            <input class="form-control" v-model="input_email" type="text" name="email" id="email"  required />
          </div>
          <div class="form-group">
            <label for="password">비밀번호</label>
            <input class="form-control" v-model="input_password" type="password" name="password" id="password" p required />
          </div>
          <div class="form-group">
            <label for="passwordRepeat">비밀번호 재입력</label>
            <input class="form-control" v-model="input_password2" type="password" name="passwordRepeat" id="passwordRepeat" required />
          </div>
          <div class="m-t-lg" style="margin-top:30px">
            <ul class="list-inline">
              
  •             <input class="btn btn--form" @click="signUp" type="submit" value="가입하기" />          
  •                         </div>     </form>     </div> </div>
    </template>
    <script>
    import firebase from "firebase/app"
    export default {
      data(){
        return{
          input_email : '',
          input_password : '',
          input_password2 : '',
        
        }
      },
      methods : {
        signUp(){
          
          firebase.auth().createUserWithEmailAndPassword(this.input_email, this.input_password).then((result)=>{
            console.log(result)
            console.log(result.user)
          }
          )
    }
      }
    }
    </script>
    
    이렇게 실행해 보았는데 정보를 입력하고 가입하기를 누르면 제 파이어베이스 회원가입 유저에 아무것도 생기지 않는데 어떤것이
    잘못된건가요
    #39556

    codingapple
    키 마스터
    개발자도구 콘솔창에 뭐뜨나 확인해봅시다
10 글 보임 - 1 에서 10 까지 (총 14 중에서)
  • 답변은 로그인 후 가능합니다.

About

현재 월 700명 신규수강중입니다.

  (09:00~20:00) 빠른 상담은 카톡 플러스친구 코딩애플 (링크)
  admin@codingapple.com
  이용약관, 개인정보처리방침
ⓒ Codingapple, 강의 예제, 영상 복제 금지
top

© Codingapple, All rights reserved. 슈퍼로켓 에듀케이션 / 서울특별시 강동구 고덕로 19길 30 / 사업자등록번호 : 212-26-14752 온라인 교육학원업 / 통신판매업신고번호 : 제 2017-서울강동-0002 호 / 개인정보관리자 : 박종흠