错误:断言失败,不兼容的Babel版本

问题描述

我试图使用Material-UI-React运行程序,但出现错误:断言失败,阻止了代码运行

console sceen shot

有人告诉我问题可能是因为Jason文件中的@babel导入是不兼容的版本,但我不知道如何解决该问题?

  "name": "final-project","version": "1.0.0","description": "","scripts": {
    "build": "webpack -p","start": "cd backend && npm run start","watch": "concurrently \"webpack --watch --mode development --devtool eval-source-map\" \"cd backend && npm run watch\""
  },"author": "","license": "MIT","dependencies": {
    "@material-ui/core": "^4.11.0","@material-ui/icons": "^4.9.1","@material-ui/lab": "^4.0.0-alpha.56","@monaco-editor/react": "^3.6.3","react": "^16.13.1","react-dom": "^16.13.1","react-router-dom": "^5.2.0","react-split-pane": "^2.0.3"
  },"devDependencies": {
    "@babel/core": "^7.7.4","@babel/preset-env": "^7.7.4","@babel/preset-react": "^7.10.4","@babel/preset-typescript": "^7.10.4","@types/react": "^16.9.49","@types/react-dom": "^16.9.8","@types/react-router-dom": "^5.1.6","babel-loader": "^8.1.0","babel-plugin-transform-imports": "^2.0.0","compression-webpack-plugin": "^6.0.2","concurrently": "^5.3.0","css-loader": "^4.3.0","html-loader": "^1.3.1","html-webpack-plugin": "^4.5.0","monaco-editor": "^0.21.2","raw-loader": "^4.0.2","style-loader": "^1.2.1","ts-loader": "^8.0.4","typescript": "^4.0.3","webpack": "^4.44.2","webpack-cli": "^3.3.12"
  },"engines": {
    "node": "v12.0.0"
  }
}

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)