2016-02-06 49 views
2

這些是我在bower.json文件中的依賴關係。他們大多與AngularJS有關。ECONFLICT無法找到合適的角度版本

"dependencies": { 
    "angular": "~1.3.0", 
    "jquery": "~2.1.1", 
    "requirejs": "~2.1.15", 
    "angular-resource": "~1.3.0", 
    "requirejs-domready": "~2.0.1", 
    "requirejs-plugins": "~1.0.3", 
    "bootstrap-sass-official": "~3.3.0", 
    "requirejs-text": "~2.0.12", 
    "bourbon": "~4.0.2", 
    "jQuery-Tag-This": "~1.1.0", 
    "angular-masonry": "~0.9.1", 
    "intl-tel-input": "~3.7.1", 
    "ngInfiniteScroll": "~1.2.0", 
    "moment-jalaali": "~0.3.3", 
    "owl.carousel": "*", 
    "persian-datepicker": "~0.3.6", 
    "persian-date": "~0.1.8", 
    "angular-ui-router": "~0.2.14", 
    "angular-cookies": "~1.3.15" 
} 

當我運行bower install,它給了我這個輸出與錯誤ECONFLICT Unable to find suitable version for angular

bower doc-ready#1.0.x     validate 1.0.4 against git://github.com/desandro/doc-ready.git#1.0.x 
bower get-style-property#~1.0.4   cached git://github.com/desandro/get-style-property.git#1.0.4 
bower get-style-property#~1.0.4   validate 1.0.4 against git://github.com/desandro/get-style-property.git#~1.0.4 
bower matches-selector#~1.0.2    cached git://github.com/desandro/matches-selector.git#1.0.3 
bower matches-selector#~1.0.2   validate 1.0.3 against git://github.com/desandro/matches-selector.git#~1.0.2 
bower fizzy-ui-utils#~1.0.1    cached git://github.com/metafizzy/fizzy-ui-utils.git#1.0.1 
bower fizzy-ui-utils#~1.0.1    validate 1.0.1 against git://github.com/metafizzy/fizzy-ui-utils.git#~1.0.1 
bower get-style-property#1.x    cached git://github.com/desandro/get-style-property.git#1.0.4 
bower get-style-property#1.x   validate 1.0.4 against git://github.com/desandro/get-style-property.git#1.x 
bower angular#~1.3.0      cached git://github.com/angular/bower-angular.git#1.3.20 
bower angular#~1.3.0     validate 1.3.20 against git://github.com/angular/bower-angular.git#~1.3.0 
bower angular#^1.3.0      cached git://github.com/angular/bower-angular.git#1.5.0 
bower angular#^1.3.0     validate 1.5.0 against git://github.com/angular/bower-angular.git#^1.3.0 
bower angular#>= 1.0.8     cached git://github.com/angular/bower-angular.git#1.5.0 
bower angular#>= 1.0.8     validate 1.5.0 against git://github.com/angular/bower-angular.git#>= 1.0.8 
bower angular#>=1.2.0      cached git://github.com/angular/bower-angular.git#1.5.0 
bower angular#>=1.2.0     validate 1.5.0 against git://github.com/angular/bower-angular.git#>=1.2.0 
bower         ECONFLICT Unable to find suitable version for angular 

你能告訴我,爲什麼它給了我這個ECONFLICT錯誤?

+0

https://stackoverflow.com/a/45861497/2393789 – onetwo12

回答

7

AngularJS版本存在衝突。你的許多依賴依賴於AngularJS,並且它們沒有用相同的AngularJS版本解決。

你應該試着在你的文件bower.json添加此:

"resolutions": { 
    "angular": "1.3.0" 
} 

由你真的想在你的項目中使用的AngularJS版本替換1.3.0

更多信息可在bower.json specification上找到。

+0

我試試這個,但不工作 –

+0

你能提供更多的細節嗎?你仍然有同樣的問題? – jeerbl

+0

是的,給予同樣的錯誤 ==> 涼亭角分辨率不合適的分辨率申報角:1.3.0 ////////// 涼亭ECONFLICT無法找到合適版本的角度 // //////////// npm ERR! Windows_NT 10.0.10240 npm ERR! argv「C:\\ Program Files \\ nodejs \\ node.exe」「C:\\ Program Files \\ nodejs \\ node_modules \\ npm \\ bin \\ npm-cli.js」「install」 npm ERR !節點v5.5.0 npm ERR! npm v3.3.12 –