Problems with babel loader in react-create-app

后端 未结 11 1188
孤城傲影
孤城傲影 2021-02-18 16:50

The Problem

create-react-app initializes a repository where babel-loader is installed as an older version than needed.

LOG:

There          


        
11条回答
  •  深忆病人
    2021-02-18 17:29

    Getting the same issue but given an hour on it get the solution When we run npm start then you got this kind of an error that is version related issues for this issue. Go to node_modules folder:

    Project->node_modules->react-scripts->package.json
    

    check the package.json file

    there you got : "babel-loader": "8.0.4" first remove : babel-loader folder for Project->node_modules->babel-loader and then run npm i babel-loader@8.0.4 (it is depend on your version you can change it like : npm i babel-loader@8.0.5) after that may be you got webpack issue then follow same thing remvoe webpack from "Project->node_modules->webpack" and reinstall npm i webpack@4.19.1

    4.19.1* webpack's version it may be change..

提交回复
热议问题