babel-runtime缺少interop-require-default

时间:2016-12-05 10:59:26

标签: javascript npm ecmascript-6 babeljs

不知道如何修复此错误。有些谷歌搜索并遵循人们的建议。甚至删除了node_modules并重新安装但没有任何作用

我收到此错误:

 Error: Cannot find module 'babel-runtime/helpers/interop-require-default' (While processing preset: "/Users/bli1/Development/node_modules/babel-preset-es2015/index.js")

的package.json:

{
  "name": "braddy",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "start": "npm-run-all --parallel testApp:watch testServer:watch open:src lint:watch",
    "open:src": "babel server/server.js",
    "testApp": "mocha --reporter nyan tests/testSetup.js \"app/**/*.test.js\"",
    "testApp:watch": "npm run testApp -- --watch",
    "testServer": "mocha --reporter progress tests/testSetup.js \"server/**/*.test.js\"",
    "testServer:watch": "npm run testServer -- --watch",
    "lint": "node_modules/.bin/esw webpack.config.* app server tests",
    "lint:watch": "npm run lint -- --watch"
  },
  "author": "",
  "license": "ISC",
  "dependencies": {
    "babel": "^6.5.2",
    "babel-cli": "^6.18.0",
    "babel-core": "^6.18.2",
    "babel-loader": "^6.2.8",
    "babel-register": "^6.18.0",
    "babel-runtime": "^6.18.0",
    "express": "^4.14.0",
    "jquery": "^3.1.1",
    "react": "^15.4.1",
    "react-dom": "^15.4.1",
    "react-router": "^3.0.0",
    "redux": "^3.6.0",
    "redux-thunk": "^2.1.0"
  },
  "devDependencies": {
    "babel-preset-react": "^6.16.0",
    "babel-runtime": "^6.18.0",
    "cheerio": "^0.22.0",
    "eslint": "^3.11.1",
    "eslint-plugin-import": "^2.2.0",
    "eslint-plugin-react": "^6.8.0",
    "eslint-watch": "^2.1.14",
    "eventsource-polyfill": "^0.9.6",
    "extract-text-webpack-plugin": "^1.0.1",
    "jsdom": "^9.8.3",
    "loglevel": "^1.4.1",
    "mocha": "^3.2.0",
    "npm-run-all": "^3.1.2",
    "open": "0.0.5",
    "react-hot-loader": "^1.3.1",
    "webpack": "^1.13.3",
    "webpack-dev-middleware": "^1.8.4",
    "webpack-dev-server": "^1.16.2",
    "webpack-hot-middleware": "^2.13.2"
  }
}

1 个答案:

答案 0 :(得分:1)

您的package.json中缺少插件babel-preset-es2015,并且在您执行npm install时未安装插件=VLOOKUP(B$22,Scenarios.New!$A$1:$M$211,IF(MATCH(Output!$A35,Scenarios.New!$A$1:$M$1,0)=2,FALSE)) 。添加它,然后重新安装。