2017-08-17 24 views
0

我有以下的庫https://github.com/codyc4321/react-data-components-updated錯誤:無法找到預設的「反應,hmre」相對於目錄

我安裝了它在我的反應一樣npm i ~/react-data-components-updated

現在運行我的節點服務器的項目,我得到:

ERROR in /Users/cchilders/react-data-components-updated/lib/index.js 
Module build failed: Error: Couldn't find preset "react-hmre" relative to directory "/Users/cchilders/react-data-components-updated" 
    at /Users/cchilders/work_projects/myproject/node_modules/babel-core/lib/transformation/file/options/option-manager.js:293:19 
    at Array.map (native) 
    at OptionManager.resolvePresets (/Users/cchilders/work_projects/myproject/node_modules/babel-core/lib/transformation/file/options/option-manager.js:275:20) 
    at OptionManager.mergePresets (/Users/cchilders/work_projects/myproject/node_modules/babel-core/lib/transformation/file/options/option-manager.js:264:10) 
    at OptionManager.mergeOptions (/Users/cchilders/work_projects/myproject/node_modules/babel-core/lib/transformation/file/options/option-manager.js:249:14) 
    at OptionManager.init (/Users/cchilders/work_projects/myproject/node_modules/babel-core/lib/transformation/file/options/option-manager.js:368:12) 
    at File.initOptions (/Users/cchilders/work_projects/myproject/node_modules/babel-core/lib/transformation/file/index.js:212:65) 
    at new File (/Users/cchilders/work_projects/myproject/node_modules/babel-core/lib/transformation/file/index.js:135:24) 
    at Pipeline.transform (/Users/cchilders/work_projects/myproject/node_modules/babel-core/lib/transformation/pipeline.js:46:16) 
    at transpile (/Users/cchilders/work_projects/myproject/node_modules/babel-loader/lib/index.js:46:20) 
@ ./client/components/tables/MyDataTable.js 64:16-56 
@ ./client/controllers/MyController.js 
@ ./client/main.js 
@ multi webpack-hot-middleware/client ./client/main.js 

在我的圖書館我有

.babelrc

{ 
    "presets": [ 
    "es2015", 
    "react", 
    "stage-1", 
    "react-hmre" 
    ] 
} 

的package.json

{ 
    "name": "react-data-components-updated", 
    "version": "0.1.0", 
    "description": "React data components updated with some fixes", 
    "keywords": [ 
    "pagination", 
    "react", 
    "react-component", 
    "table" 
    ], 
    "license": "MIT", 
    "main": "./lib/index", 
    "files": [ 
    "css", 
    "lib", 
    "dist", 
    "src" 
    ], 
    "repository": { 
    "type": "git", 
    "url": "https://github.com/codyc4321/react-data-components-updated" 
    }, 
    "dependencies": { 
    "babel-plugin-transform-decorators-legacy": "^1.3.4", 
    "lodash": "^4.13.1", 
    "prop-types": "^15.5.10" 
    }, 
    "peerDependencies": { 
    "react": "^0.14.0 || ^15.0.0-0" 
    }, 
    "devDependencies": { 
    "babel-cli": "^6.10.1", 
    "babel-core": "^6.10.4", 
    "babel-eslint": "^7.0.0", 
    "babel-jest": "^20.0.3", 
    "babel-loader": "^7.1.1", 
    "babel-plugin-lodash": "^3.2.4", 
    "babel-preset-es2015": "^6.24.1", 
    "babel-preset-react": "^6.5.0", 
    "babel-preset-stage-1": "^6.5.0", 
    "eslint": "^4.1.1", 
    "eslint-plugin-react": "^7.1.0", 
    "flow-bin": "^0.49.1", 
    "husky": "^0.14.1", 
    "jest": "^20.0.4", 
    "lint-staged": "^4.0.0", 
    "lodash-webpack-plugin": "^0.11.4", 
    "prettier": "^1.5.2", 
    "react": "^15.1.0", 
    "react-addons-test-utils": "^15.1.0", 
    "react-dom": "^15.1.0", 
    "react-redux": "^4.4.5", 
    "react-test-renderer": "^15.6.1", 
    "redux": "^3.5.2", 
    "rimraf": "^2.4.3", 
    "webpack": "^3.1.0", 
    "webpack-dev-server": "^2.5.0" 
    }, 
    "scripts": { 
    "build": "webpack && babel src -d lib", 
    "check": "flow check", 
    "clean": "rimraf lib dist coverage", 
    "lint": "eslint src", 
    "precommit": "lint-staged", 
    "prepublish": "npm run clean && npm run build", 
    "start": "webpack-dev-server -d --config example/webpack.config.js", 
    "test": "npm run lint && npm run check && jest" 
    }, 
    "lint-staged": { 
    "*.js": [ 
     "prettier --write --single-quote --trailing-comma all", 
     "git add" 
    ] 
    }, 
    "jest": { 
    "roots": [ 
     "src" 
    ] 
    } 
} 

我怎樣才能解決這個react-hmre錯誤?謝謝

回答

相關問題