Mislam Mislam - 1 month ago 19
AngularJS Question

"bower install" and "bower update" showing error

Here is my bower.json. I pulled my project from Github, bower files was updated on ubuntu 14.04. But after taking a pull. my angular version is showing 1.4.8 in bower.json file. But inside bower_components there is the angular 1.4.14. So I ran "bower update". But it ended showing "ECONFLICT Unable to find suitable version for angular". I tried deleting bower_components and ran bower install, but still same problem comes up. my nodejs version is 6.9.1 and I installed it recently. What should I do now? Please give me a solution.

{
"name": "starter-gulp",
"version": "0.1.0",
"description": "Starter Code for Gulp Angular ",
"authors": [
"John Papa"
],
"license": "MIT",
"homepage": "https://github.com/..-gulp",
"ignore": [
"**/.*",
"node_modules",
"bower_components"
],
"devDependencies": {
"angular-mocks": "~1.3.8",
"sinon": "http://sinonjs.org/releases/sinon-1.12.1.js",
"bardjs": "~0.0.3"
},
"dependencies": {
"angular": "~1.4.8",
"angular-animate": "~1.4.7",
"angular-bootstrap": "~1.1.0",
"angular-drag-and-drop-lists": "dndLists#~1.3.0",
"angular-resource": "~1.4.7",
"angular-sanitize": "~1.4.8",
"angular-summernote": "~0.7.0",
"angular-ui-router": "~0.2.13",
"bootflat": "*",
"bootstrap": "~3.3.6",
"extras.angular.plus": "~0.9.2",
"font-awesome": "~4.5.0",
"Ionicons": "ionicons#~2.0.1",
"jquery": "~2.1.4",
"jquery-quick-pagination": "*",
"jquery-ui": "~1.11.4",
"moment": "~2.8.4",
"remodal": "~1.0.6",
"summernote": "~0.7.0",
"toastr": "~2.1.0",
"vunit": "~0.2.0",
"async": "^1.5.2",
"angular-ui-tree": "^2.15.0",
"ng-file-upload": "^12.0.4",
"ng-img-crop": "ngImgCrop#^0.3.2",
"angular-local-storage": "^0.3.0"
}
}


==============================================

bower bootflat#* progress remote: Compressing objects: 100% (27/27), done.
bower bootflat#* resolved https://github.com/flathemes/bootflat.git#affdd96590
bower bootstrap#~3.3.6 install bootstrap#3.3.7
bower postinstall gulp wiredep
bower postinstall [23:03:25]
bower postinstall Using gulpfile E:\Apps\xampp\htdocs\web-module\gulpfile.js
bower postinstall [23:03:25]
bower postinstall Starting 'wiredep'...
bower postinstall [23:03:25] Wire bower css, js and our app js into html
bower postinstall [23:03:25]
bower postinstall gulp-inject 49 files into index.html.
bower postinstall [23:03:25] Finished 'wiredep' after 401 ms

bootstrap#3.3.7 bower_components\bootstrap
└── jquery#2.1.4


Also after "npm install" I get these lines, I am confused about it, though its just a warning.something is said about os. asked for 'darwin' but current 'win32'. is that a problem.

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.0.14: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN gulp-jshint@2.0.2 requires a peer of jshint@2.x but none was installed.

Answer

Usually it means, some component requirement is not met. For example angular-mocks version is 1.3.8 has dependency to angular 1.3.8. Try change to something like:

"angular-mocks" : "1.4.8"

Edit:

From fsevents page:

The FSEvents API in OS X allows applications to register for notifications of changes to a given directory tree.

so it is not applicable if you are running Windows. If you want to run without any notifications:

npm install --no-optional

If bower does not give you prompt to select a software components version, it means bower is able to select it automatically for you. So nothing to worry.

Comments