找不到模块。无法解决“ @ babel / runtime / helpers / builtin / classCallCheck”

时间:2018-08-07 07:42:00

标签: javascript reactjs typescript babeljs material-ui

我已经克隆了一个仓库并做了npm i。但是当我运行它时,我在控制台上遇到了上述错误。因此,我尝试使用此question解决方案,错误消失了。但是现在的问题是我的应用程序没有加载,我得到的是空白页而没有任何错误。然后,我删除了@babel/runtime的依存关系。这是我的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"
  }
}

1 个答案:

答案 0 :(得分:2)

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