2016-12-05 74 views
0

不知道如何去解決這個錯誤。做了一些谷歌搜索,並遵循人們推薦的內容。即使除去node_modules並重新安裝,但沒有任何工程babel-runtime缺少interop-require-default

我收到此錯誤:

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

插件babel-preset-es2015中缺少您的package.json,並沒有安裝當你做npm install。添加它,然後再次安裝。