2014-05-08 36 views
10

Có lỗi ở cuối lệnh npm install.Lỗi trong lệnh cài đặt npm

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 [email protected]~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 

mặc dù tôi đã cho phép nhân bản git dưới http thay vì git sử dụng 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" 

    } 
} 

thể một số một đề nghị một giải pháp cho việc này?

+0

gì packages.json trông giống như –

+0

vui lòng tìm bài cập nhật với nội dung tập tin package.json – helloworld

+1

Vâng, nghiệp 0,10 yêu cầu nghiệp-requirejs 0,2, bạn chỉ định 0,1. Có lẽ điều chỉnh để đáp ứng yêu cầu, nếu bạn có thể –

Trả lời

7

Vâng, karma 0.10 đòi hỏi karma-requirejs 0.2 như bạn có thể thấy:

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

npm ERR! peerinvalid Peer [email protected] wants [email protected]~0.2.0 

Tuy nhiên trong package.json của bạn mà bạn chỉ định karma-requirejs0.1.

Điều chỉnh đó để đáp ứng yêu cầu và nó cũng làm việc

+0

Lệnh thực tế bạn nhập để điều chỉnh 'npm' để đáp ứng loại yêu cầu này là gì? Tôi nhận được một lỗi tương tự với 'EPEERINVALID [email protected] yêu cầu một đồng đẳng của [email protected]^0.14.7 nhưng không có gì được cài đặt.', nhưng đã thực hiện' npm i -g react @^0.14.7'. – isomorphismes

2

phiên bản nâng cấp nghiệp .. đó là nó .. "karma": "~0.12.0"

Các vấn đề liên quan