Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error in npm install command

Got an error at the end of npm install command.

angular#1.2.1 bower_components\angular
npm ERR! peerinvalid The package karma-requirejs does not satisfy its siblings'
peerDependencies requirements!
npm ERR! peerinvalid Peer [email protected] wants karma-requirejs@~0.2.0

npm ERR! System Windows_NT 6.1.7600
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nod
ejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! cwd F:\AngularExamples\KarmaTest546\AngularJS-Testing-Article
npm ERR! node -v v0.10.28
npm ERR! npm -v 1.4.9

npm ERR! code EPEERINVALID

npm ERR!

npm ERR! Additional logging details can be found in:

npm ERR!     F:\AngularExamples\KarmaTest546\AngularJS-Testing-Article\npm-debug
.log

npm ERR! not ok code 0

although I have allowed to clone git under http instead of git using git config --global url."https://".insteadOf git://

package.json :-

{


"name": "yom-angularjs-testing-article",



"version": "0.0.0",
  "repository": {
    "type": "git",
    "url": "https://github.com/matsko/YOM-AngularJS-Testing-Article"
  },



"scripts": {
    "postinstall": "./node_modules/.bin/bower install"
  },
  "homepage": "https://github.com/yearofmoo/YOM-AngularJS-Testing-Article",
  "devDependencies": {


 "grunt": "~0.4.1",
    "grunt-css": "~0.5.4",
    "grunt-contrib-connect": "~0.1.2",
    "grunt-contrib-uglify": "~0.2.1",
    "grunt-contrib-concat": "~0.3.0",
    "grunt-contrib-watch": "~0.4.4",
    "grunt-shell": "~0.2.2",
    "grunt-contrib-copy": "~0.4.1",
    "karma-mocha": "latest",
    "karma-chrome-launcher": "~0.1.0",
    "karma-safari-launcher": "latest",
    "karma-firefox-launcher": "~0.1.0",
    "karma-ng-scenario": "latest",
    "chai": "1.4.0",
    "karma-script-launcher": "~0.1.0",
    "karma-html2js-preprocessor": "~0.1.0",
    "karma-jasmine": "~0.1.3",
    "karma-requirejs": "~0.1.0",
    "karma-coffee-preprocessor": "~0.1.0",
    "karma-phantomjs-launcher": "~0.1.0",
    "karma": "~0.10.2",
    "grunt-karma": "~0.6.2",
    "grunt-open": "~0.2.2",
    "ng-midway-tester": "2.0.5",
    "bower": "~1.2.7"

  }
}

can some one suggest a solution for this?

like image 498
helloworld Avatar asked May 08 '14 12:05

helloworld


People also ask

Why can't I npm install?

You need to make sure you have a package. json file right in the current directory where you run the command. Once you see there's a package. json file in the output as shown above, then you can run the npm install command.

Why does npm show error?

The error in NPM, 'error package install failed, see above', can occur when the user creates a new project in Angular using Node. js using VS code. This means that NPM is corrupted in your system, and must reinstall NPM.


2 Answers

Well, karma 0.10 requires karma-requirejs 0.2 as you can see:

npm ERR! peerinvalid The package karma-requirejs does not satisfy its siblings' peerDependencies requirements! 

npm ERR! peerinvalid Peer [email protected] wants karma-requirejs@~0.2.0

However in your package.json you specified karma-requirejs 0.1.

Adjust that to meet the requirement and it should work

like image 172
Tim Avatar answered Oct 13 '22 18:10

Tim


upgrade karma version .. that’s it .. "karma": "~0.12.0"

like image 29
Aneer Geek Avatar answered Oct 13 '22 18:10

Aneer Geek