2016-06-24 15 views
7

मैं आधिकारिक कोणीय 2 साइट से संकुल.जेसन का उपयोग कर त्वरित शुरुआत करता हूं। कल यह ठीक काम कर रहा था, आज एनपीएम निर्भरताओं को हल नहीं कर सकता। मैं त्रुटि मिलती है:कोणीय 2 आरसी 3 - अनसुलझे निर्भरता

npm ERR! peerinvalid The package @angular/[email protected] does not satisfy its siblings' peerDependencies requirements! 
npm ERR! peerinvalid Peer @angular/[email protected] wants @angular/[email protected] 
npm ERR! peerinvalid Peer @angular/[email protected] wants @angular/[email protected] 
npm ERR! peerinvalid Peer @angular/[email protected] wants @angular/[email protected] 
npm ERR! peerinvalid Peer @angular/[email protected] wants @angular/[email protected] 
npm ERR! peerinvalid Peer @angular/[email protected] wants @angular/[email protected] 
npm ERR! peerinvalid Peer @angular/[email protected] wants @angular/[email protected] 
npm ERR! peerinvalid Peer @angular/[email protected] wants @angular/[email protected]^2.0.0-rc.2 
npm ERR! peerinvalid Peer @angular/[email protected] wants @angular/[email protected]^2.0.0-rc 
npm ERR! peerinvalid Peer @angular/[email protected] wants @angular/[email protected] 
npm ERR! peerinvalid Peer [email protected] wants @angular/[email protected] 

मेरे NPM-डिबग: http://q.i-systems.pl/file/3dd29e55.zip

+0

यह node_module dir को दूर करने लगता है और उसके बाद काम करता है स्थापित चलाने;) – ayeo

उत्तर

5

यह तब होता है जब आप कुछ संकुल को अद्यतन करने और कुछ फांसी छोड़ देते हैं, कि क्या कोणीय सिर्फ RC.3 में किया था है।


फिक्सिंग कौन क्या जरूरत के बजाय,

  • मैं node_modules
  • की नकल की package.json नष्ट कर दिया QuickStart से कहा, मेरे अतिरिक्त
  • भाग गया npm install

NPM खुश है फिर।

0

यह आवश्यक पैकेज संस्करण के मेल के कारण होता है। क्विकस्टार्ट फ़ोल्डर के अंदर पैकेज.जेसन कहा जाता है। यह package.json लगता है कि यह

{ 
    "name": "angular2-quickstart", 
    "version": "1.0.0", 
    "description": "QuickStart package.json from the documentation,supplemented with testing support", 
    "scripts": { 
    "start": "tsc && concurrently \"tsc -w\" \"lite-server\" ", 
    "docker-build": "docker build -t ng2-quickstart .", 
    "docker": "npm run docker-build && docker run -it --rm -p 3000:3000 -p 3001:3001 ng2-quickstart", 
    "pree2e": "npm run webdriver:update", 
    "e2e": "tsc && concurrently \"http-server\" \"protractor protractor.config.js\"", 
    "lint": "tslint ./app/**/*.ts -t verbose", 
    "lite": "lite-server", 
    "postinstall": "typings install", 
    "test": "tsc && concurrently \"tsc -w\" \"karma start karma.conf.js\"", 
    "tsc": "tsc", 
    "tsc:w": "tsc -w", 
    "typings": "typings", 
    "webdriver:update": "webdriver-manager update" 
}, 
"keywords": [], 
"author": "", 
"license": "ISC", 
    "dependencies": { 
     "@angular/common": "2.0.0-rc.2", 
"@angular/compiler": "2.0.0-rc.2", 
"@angular/core": "2.0.0-rc.2", 
"@angular/forms": "0.1.0", 
"@angular/http": "2.0.0-rc.2", 
"@angular/platform-browser": "2.0.0-rc.2", 
"@angular/platform-browser-dynamic": "2.0.0-rc.2", 
"@angular/router": "3.0.0-alpha.7", 
"@angular/router-deprecated": "2.0.0-rc.2", 
"@angular/upgrade": "2.0.0-rc.2", 

"systemjs": "0.19.27", 
"core-js": "^2.4.0", 
"reflect-metadata": "^0.1.3", 
"rxjs": "5.0.0-beta.6", 
"zone.js": "^0.6.12", 

"angular2-in-memory-web-api": "0.0.12", 
"bootstrap": "^3.3.6" 
}, 
"devDependencies": { 
"concurrently": "^2.0.0", 
"lite-server": "^2.2.0", 
"typescript": "^1.8.10", 
"typings": "^1.0.4", 

"canonical-path": "0.0.2", 
"http-server": "^0.9.0", 
"tslint": "^3.7.4", 
"lodash": "^4.11.1", 
"jasmine-core": "~2.4.1", 
"karma": "^0.13.22", 
"karma-chrome-launcher": "^0.2.3", 
"karma-cli": "^0.1.2", 
"karma-htmlfile-reporter": "^0.2.2", 
"karma-jasmine": "^0.3.8", 
"protractor": "^3.3.0", 
"rimraf": "^2.5.2" 
}, 
"repository": {} 
} 

अब अगर निर्भरता खंड के अंदर देखो हम इस

dependencies": { 
     "@angular/common": "2.0.0-rc.2", 
"@angular/compiler": "2.0.0-rc.2", 
"@angular/core": "2.0.0-rc.2", 
"@angular/forms": "0.1.0", 
"@angular/http": "2.0.0-rc.2", 
"@angular/platform-browser": "2.0.0-rc.2", 
"@angular/platform-browser-dynamic": "2.0.0-rc.2", 
"@angular/router": "3.0.0-alpha.7", 
"@angular/router-deprecated": "2.0.0-rc.2", 
"@angular/upgrade": "2.0.0-rc.2", 
} 

की तरह कुछ देखना यह वह जगह है जहाँ हम निर्दिष्ट करते हैं जो पैकेज हम अपने संस्करण के साथ की जरूरत है। अगर संकुल की उच्च संस्करण का उपयोग करना चाहते, संस्करण number.Following में उपयोग^rc.2 निर्भरता सेट हो जाएगा या उच्च

dependencies": { 
"@angular/common": "^2.0.0-rc.2", 
"@angular/compiler": "^2.0.0-rc.2", 
"@angular/core": "^2.0.0-rc.2", 
"@angular/forms": "^0.1.0", 
"@angular/http": "^2.0.0-rc.2", 
"@angular/platform-browser": "^2.0.0-rc.2", 
"@angular/platform-browser-dynamic": "^2.0.0-rc.2", 
"@angular/router": "^3.0.0-alpha.7", 
"@angular/router-deprecated": "^2.0.0-rc.2", 
"@angular/upgrade": "^2.0.0-rc.2" 
} 

अब शेल और कमांड को चलाने के लिए जाना

npm cache clean -f 
npm update -g 

यह अद्यतन करेगा आपके यदि उपलब्ध हो तो उच्च संस्करण के लिए पैकेज।

5

अपग्रेड NPM मेरे लिए काम किया:

npm install npm -g 

तो हटाना node_modules और

npm install 
संबंधित मुद्दे