Webpack4 package, 'babel' of undefined,babel-loader is uninstalled, reinstallation is not allowed, online, etc.

clipboard.png
clipboard.png

clipboard.png

Mar.06,2021

first install rimraf globally, and then try:

npm install -g rimraf
rimraf node_modules
npm install
What is the npm version of

? If you have package-lock.json this file, delete it first and then delete npm install

add:

npm install babel-preset-react -D

create a new file .babelrc in the project root directory, and delete babel from package.json .

{
  "presets": ["env", "react"]
}
Menu