简体   繁体   中英

Module not found. “@babel/runtime/helpers/builtin/classCallCheck” can't be resolved

I have cloned a repo and did npm i . But as I ran it I was getting the above mentioned error on my console. So I tried a solution from this question and the error disappeared. But now the problem is that my app isn't loading I'm getting a blank page without any errors. I then removed the @babel/runtime dependecy. Here is my package.json:

{
  //... some app info
  "main": "dist/app.js",
  "scripts": {
    "clean": "rimraf dist",
    "build": "yarn run clean && webpack-dashboard -- webpack --config configs/webpack.config.js --env.build --env.sourceMap",
    "dev": "webpack-dashboard -m -- webpack-dev-server --config configs/webpack.config.js --open",
    "dev2": "webpack-dashboard -m -- webpack-dev-server --config configs/webpack.config.js --open --env.awesome",
    "lint": "tslint --project tsconfig.json",
    "tsc": "tsc -p . --noEmit",
    "tsc:watch": "tsc -p . --noEmit -w",
    "test": "jest --config jest.json",
    "test:update": "jest --config jest.json -u",
    "reinstall": "rm -rf node_modules && yarn",
    "reinstall:win": "rd /s /q node_modules && yarn",
    "precommit": "yarn run lint",
    "prepush": "yarn run lint & yarn run tsc & yarn run test",
    "deploy": "echo 'deploy not set!'"
  },
  "dependencies": {
    "classnames": "^2.2.5",
    "csstips": "^0.2.0",
    "firebase": "^4.8.0",
    "ismobilejs": "^0.4.1",
    "material-ui": "^0.19.4",
    "numeral": "^2.0.6",
    "radium": "^0.19.6",
    "react": "16.1.1",
    "react-dom": "16.1.1",
    "react-firebase-storage-connector": "^1.1.0",
    "react-redux": "5.0.6",
    "react-stripe-elements": "^1.2.1",
    "react-tooltip": "^3.4.0",
    "redux": "3.7.2",
    "redux-actions": "2.2.1",
    "redux-form": "^7.2.0",
    "redux-thunk": "^2.2.0",
    "tslib": "1.6.1",
    "typestyle": "^1.3.2"
  },
  "devDependencies": {
    "@types/radium": "^0.18.23",
    "@types/classnames": "^2.2.3",
    "@types/firebase": "^2.4.32",
    "@types/material-ui": "0.18.3",
    "@types/node": "7.0.14",
    "@types/react": "16.0.25",
    "@types/react-dom": "16.0.3",
    "@types/react-hot-loader": "^3.0.0-beta.7",
    "@types/react-redux": "5.0.13",
    "@types/redux-actions": "2.2.2",
    "@types/redux-form": "^7.0.10",
    "@types/webpack": "^2.2.15",
    "@types/webpack-dev-server": "^1.12.6",
    "@types/webpack-env": "^1.13.3",
    "awesome-typescript-loader": "^3.4.1",
    "css-loader": "^0.28.7",
    "extract-text-webpack-plugin": "^3.0.1",
    "file-loader": "^1.1.6",
    "html-webpack-plugin": "^2.28.0",
    "husky": "^0.13.3",
    "jest": "^19.0.2",
    "less": "^3.0.0-alpha.3",
    "less-loader": "^4.0.5",
    "postcss-loader": "^2.0.8",
    "react-hot-loader": "^3.0.0-beta.6",
    "redux-devtools-extension": "^2.13.2",
    "rimraf": "^2.6.1",
    "style-loader": "^0.19.1",
    "ts-jest": "^19.0.14",
    "ts-loader": "^2.0.3",
    "tslint": "^5.1.0",
    "tslint-react": "^3.0.0",
    "typescript": "2.6.1",
    "url-loader": "^0.6.2",
    "webpack": "^2.2.1",
    "webpack-dashboard": "^0.4.0",
    "webpack-dev-server": "^2.9.7"
  }
}

快速修复:npm添加@ babel / runtime

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM