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

home2 게시판 React 게시판 React Redux 오류

React Redux 오류

3 글 보임 - 1 에서 3 까지 (총 3 중에서)
  • 글쓴이
  • #111014

    최재안
    참가자
    store.js에
    
    import { configureStore, createSlice } from '@reduxjs/toolkit'
    export default configureStore({
      reducer: { 
        
      }
    })
    를 입력하고 index.js에
    import store from './store.js' 를 입력하고 저장하면
    Failed to compile.
    ./node_modules/@reduxjs/toolkit/dist/redux-toolkit.legacy-esm.js 331:12
    Module parse failed: Unexpected token (331:12)
    You may need an appropriate loader to handle this file type.
    |     return false;
    |   }
    >   if (cache?.has(value)) return false;
    |   const entries = getEntries != null ? getEntries(value) : Object.entries(value);
    |   const hasIgnoredPaths = ignoredPaths.length > 0;
    
    이런 오류가 납니다.
    react react dom 버전은 18.2 입니다
     
    #111045

    codingapple
    키 마스터
    npm uninstall @reduxjs/toolkit 하고 
    npm install @reduxjs/toolkit@1.8.1 입력해봅시다
    #111046

    최재안
    참가자
    위 방법으로 설치했더니 해결되었네요 감사합니다!
3 글 보임 - 1 에서 3 까지 (총 3 중에서)
  • 답변은 로그인 후 가능합니다.

About

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

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

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