0

Was trying to install

sudo npm install react-datagrid --save
sudo npm install react-datepicker --save

Console Output

npm ERR! peerinvalid The package react does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer react-datagrid@2.0.2 wants react@>=0.14.0
npm ERR! peerinvalid Peer react-dom@15.0.1 wants react@^15.0.1
npm ERR! peerinvalid Peer input-moment@0.1.0 wants react@^0.14.0
npm ERR! peerinvalid Peer react-datepicker@0.26.0 wants react@^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

The required dependency is react@^15.0.1 which is already installed can be seen in package.json I do I overcome this issue.

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"
  }
}
Shashank K
  • 388
  • 4
  • 13

3 Answers3

1

you can update last npm that solve your problem

sudo npm install npm -g
masouk
  • 576
  • 4
  • 8
0

Use

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

Avraam Mavridis
  • 8,698
  • 19
  • 79
  • 133
0

I was able to fix the issue by installing a stable version on node I upgraded from v0.10.25 to v4.4.3

Step 1: First Remove the old version of node by finding the location of installation

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

Step 2: Download Stable version of Node (I used node-v4.4.3-linux-x64.tar.gz )

Step 3: Install the stable version of Node in /usr/local/

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

Voilà

Shashank K
  • 388
  • 4
  • 13