2016-04-29 81 views
0

嘗試安裝套餐反應不能滿足它的兄弟姐妹

須藤NPM安裝反應,數據網格--save
須藤NPM安裝反應,日期選擇器--save

控制檯輸出

npm ERR! peerinvalid The package react does not satisfy its siblings' peerDependencies requirements! 
npm ERR! peerinvalid Peer [email protected] wants [email protected]>=0.14.0 
npm ERR! peerinvalid Peer [email protected] wants [email protected]^15.0.1 
npm ERR! peerinvalid Peer [email protected] wants [email protected]^0.14.0 
npm ERR! peerinvalid Peer [email protected] wants [email protected]^0.14.0 

npm ERR! System Linux 3.19.0-56-generic 
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "react-datagrid" "--save" 
npm ERR! cwd /home/shashank/webapps/cms 
npm ERR! node -v v0.10.25 
npm ERR! npm -v 1.3.10 
npm ERR! code EPEERINVALID 
npm ERR! 
npm ERR! Additional logging details can be found in: 
npm ERR!  /home/shashank/webapps/cms/npm-debug.log 
npm ERR! not ok code 0 

所需的依賴關係是[email protected]^15.0.1這是alre安裝ady可以在package.json中看到我解決了這個問題。

的package.json

"devDependencies": { 
    "babel-core": "^6.7.7", 
    "babel-loader": "^6.2.4", 
    "babel-preset-es2015": "^6.5.0", 
    "babel-preset-react": "^6.5.0", 
    "babelify": "^7.2.0", 
    "browserify": "^13.0.0", 
    "chalk": "^1.1.1", 
    "gulp": "gulpjs/gulp#4.0", 
    "gulp-cli": "gulpjs/gulp-cli#4.0", 
    "gulp-concat": "^2.6.0", 
    "gulp-cssnano": "^2.1.1", 
    "gulp-htmlmin": "^1.3.0", 
    "gulp-if": "^2.0.0", 
    "gulp-rename": "^1.2.2", 
    "gulp-replace": "^0.5.4", 
    "gulp-sourcemaps": "^1.6.0", 
    "gulp-uglify": "^1.5.3", 
    "gulp-util": "^3.0.7", 
    "gulp-watch": "^4.3.5", 
    "pretty-hrtime": "^1.0.2", 
    "vinyl-buffer": "^1.0.0", 
    "vinyl-source-stream": "^1.1.0", 
    "watchify": "^3.7.0", 
    "yargs": "^4.1.0" 
    }, 
    "dependencies": { 
    "gulp-rename": "^1.2.2", 
    "moment": "^2.13.0", 
    "react": "^15.0.1", 
    "react-datagrid": "^2.0.2", 
    "react-dom": "^15.0.1" 
    } 
} 

回答

0

使用

"react": "^15.0.1 || ^0.14.0"

+0

我更新了package.json,但仍面臨同樣的問題。 – Shashank

0

我能夠通過安裝在節點的穩定版本,以解決這個問題,我從v0.10.25升級到v4.4.3

步驟1:首先通過查找安裝位置刪除舊版本的節點

$ which node (Finds the path of installations Eg: /usr/bin/nodejs) 
$ sudo rm -rf /usr/bin/nodejs 

步驟2:下載的Node穩定版本(I使用的節點-v4.4.3-Linux的x64.tar.gz)

步驟3:在安裝節點的穩定版本的/ usr /本地/

$ sudo tar -C /usr/local/ --strip-components 1 -xzf node-v4.4.3-linux-x64.tar.gz 

0

可以更新解決您的問題最後NPM

sudo npm install npm -g