Regardless of the version specified in the "bower.json" file, bower (v1.8.0) ignores it and downloads the latest version of the library available.It is not asking to specify the version. Downgrading to the earlier version (v1.3.8) of bower didn't help :(. For example i have specified anuglarjs as 1.5.8 but it downloads 1.6.4.
My bower.json
{
"name": "XXXXXXXXXXXX",
"homepage": "XXXXXXXXXXXX",
"authors": [
"XXXXXXXXXX"
],
"description": "XXXXXXXXXXXX",
"main": "",
"overrides": {
"bootstrap": {
"main": [
"./dist/css/bootstrap.min.css",
"./fonts/glyphicons-halflings-regular.eot",
"./fonts/glyphicons-halflings-regular.svg",
"./fonts/glyphicons-halflings-regular.ttf",
"./fonts/glyphicons-halflings-regular.woff",
"./fonts/glyphicons-halflings-regular.woff2"
]
},
"pouchdb": {
"main": [
"./dist/pouchdb.min.js"
]
},
"cldrjs": {
"ignore": true
},
"cldr-data": {
"ignore": true
},
"globalize": {
"ignore": true
}
},
"license": "",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
],
"dependencies": {
"jquery": "^2.2.3",
"angular": "^1.5.8",
"bootstrap": "^3.3.7",
"angular-route": "^1.4.9",
"toastr": "^2.1.3",
"angular-toastr": "^2.1.1",
"angular-cookies": "^1.5.8",
"angular-translate": "^2.12.0",
"angular-i18n": "^1.5.8",
"angular-translate-loader-static-files": "^2.12.0",
"angular-translate-storage-local": "^2.12.0",
"angular-sanitize": "^1.5.8",
"devextreme": "^16.1.7",
"ngstorage": "^0.3.11",
"angular-base64-upload": "^0.1.19",
"pouchdb": "^6.0.7",
"pouchdb-find": "^0.10.3",
"angular-disable-all": "^0.0.2",
"angular-loading-bar": "^0.9.0"
}
}
Remove the ^ symbol in front of the version number. This means "at least this version". In other words: It won't update your library if the version is equal or higher to the specified version, but if you are installing a new workspace, it will take the newest one.
Here are some more information: What is the bower (and npm) version syntax?
Related
{
"name": "concur-frontend",
"version": "0.0.0",
"dependencies": {
"angular": "1.5.8",
"bootstrap": "3.3.7",
"angular-animate": "1.5.8",
"angular-cookies": "1.5.8",
"angular-resource": "1.5.8",
"angular-route": "1.5.8",
"angular-sanitize": "1.5.8",
"angular-touch": "1.5.8",
"angular-ui-router": "0.3.2",
"lodash": "3.0.0",
"restangular": "1.6.1",
"angular-bootstrap": "1.2.5",
"ui-bootstrap": "2.5.0",
"angular-spinner": "0.8.1",
"spin": "1.1.6",
"bootstrap-ui-datetime-picker": "2.3.1"
},
"devDependencies": {
"angular-mocks": "^1.4.0"
},
"appPath": "app",
"moduleName": "meetingApp",
"overrides": {
"bootstrap": {
"main": [
"less/bootstrap.less",
"dist/css/bootstrap.css",
"dist/js/bootstrap.js"
]
}
},
"resolutions": {
"angular-bootstrap": "~1.2.0"
}
}
The above is my bower.json file and i get the error in the console
bower restangular#1.6.1 ENOTFOUND Package restangular not found
I searched for the similar error and found few links saying the bower 1.8.x has similar errors but i do get the same in 1.7.9 as well.
Let me know if i am going wrong anywhere, i am searching for this since 4 days but still no-luck
Thanks in Adv.
I strike this error one again, last time I have fixed but do not know how this fixed but again it occurs.
I have ngstorage module installed and projecr run fine when it's in development ( gulp clean serve ) BUT when it goes to production ( gulp serve:dist) , it execute well but main page is blank and there is error in console
Uncaught Error: [$injector:modulerr] Failed to instantiate module app
due to: Error: [$injector:modulerr] Failed to instantiate module
ngStorage due to: Error: [$injector:nomod] Module 'ngStorage' is not
available! You either misspelled the module name or forgot to load it.
If registering a module ensure that you specify the dependencies as
the second argument.
http://errors.angularjs.org/1.5.8/$injector/nomod?p0=ngStorage
although I have checked that it's installed can somebody can suggest what is the issue and how to fix this? here is my bower.json
{
"name": "project",
"version": "0.1.1",
"dependencies": {
"angular-animate": "1.5.8",
"angular-touch": "~1.5.0",
"angular-sanitize": "~1.5.0",
"angular-messages": "~1.5.0",
"angular-aria": "~1.5.0",
"jquery": "~2.1.4",
"angular-resource": "~1.5.0",
"angular-ui-router": "~0.2.15",
"bootstrap": "~3.3.6",
"angular-bootstrap": "~1.1.2",
"angular-toastr": "~2.0.0",
"moment": "~2.13.0",
"animate.css": "~3.4.0",
"angular": "~1.5.0",
"ng-table": "^1.0.0",
"pace": "~1.0.2",
"metisMenu": "~2.0.2",
"fontawesome": "~4.5.0",
"roboto-fontface": "^0.7.0",
"angular-ui-validate": "^1.2.2",
"ng-stomp": "^0.2.0",
"angular-scrollable-table": "^1.1.1",
"aws-sdk": "aws-sdk-js#^2.7.7",
"ng-file-upload": "^12.2.13",
"angular-recaptcha": "^4.0.3",
"ng-csv": "^0.3.6",
"ngstorage": "^0.3.11",
"intl-tel-input": "5.1.7",
"international-phone-number": "^0.0.16",
"angular-chart.js": "^1.1.1"
},
"devDependencies": {
"angular-mocks": "1.5.8"
},
"overrides": {
"bootstrap": {
"main": [
"less/bootstrap.less",
"dist/fonts/glyphicons-halflings-regular.eot",
"dist/fonts/glyphicons-halflings-regular.svg",
"dist/fonts/glyphicons-halflings-regular.ttf",
"dist/fonts/glyphicons-halflings-regular.woff",
"dist/fonts/glyphicons-halflings-regular.woff2"
]
},
"fontawesome": {
"main": [
"less/font-awesome.less",
"fonts/fontawesome-webfont.eot",
"fonts/fontawesome-webfont.svg",
"fonts/fontawesome-webfont.ttf",
"fonts/fontawesome-webfont.woff",
"fonts/fontawesome-webfont.woff2"
]
},
"roboto-fontface": {
"main": [
"css/roboto/less/roboto-fontface.less"
]
},
"chart.js": {
"main": [
"dist/Chart.bundle.min.js"
]
}
},
"resolutions": {
"jquery": "~2.1.4",
"angular": "1.5.8"
},
"description": "Project Manager On-Premise",
"main": "",
"homepage": "index.html",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
]
}
I think there is issue related to stmop or I am using broswer-sync , that may be cause but cant be sure.
see the
Issue was dues to one of library --which is included-- missing semicolon in it's main js file
cause:
I was using ng-stomp in my project and installed this library using bower install and when I run gulp dist:serve it minified all the files which are mentioned in the main bower.json file and it read bower_components/ng-stomp/package.json where main file location was "main": "src/ng-stomp.js" and this file missing semicolon in the end so when next js library ( ngStorage) is minified, it does not recognize by it's parser and it throws error.
solution:
override the main file by writing below code in my bower.json overrides block ( add the ng-stomp.min.js which has semicolon in end)
"ng-stomp": {
"main": [
"dist/ng-stmop.min.js"
]
}
hope it helps someone
I had an old Ionic project whose package.json file is like following:
{
"name": "example",
"version": "1.1.1",
"description": "example: An Ionic project",
"dependencies": {
"angular-messages": "^1.5.1",
"gulp": "^3.5.6",
"gulp-concat": "^2.2.0",
"gulp-minify-css": "^0.3.0",
"gulp-rename": "^1.2.0",
"gulp-sass": "^2.0.4"
},
"devDependencies": {
"bower": "^1.3.3",
"gulp-util": "^2.2.14",
"shelljs": "^0.3.0"
},
"cordovaPlugins": [
"cordova-plugin-device",
"cordova-plugin-console",
"cordova-plugin-whitelist",
"cordova-plugin-splashscreen",
"cordova-plugin-statusbar",
"ionic-plugin-keyboard"
],
"cordovaPlatforms": [
"android"
]
}
Bower.json:
{
"name": "HelloIonic",
"private": "true",
"dependencies": {
"angular": "~1.3.1",
"angular-route": "~1.3.1",
"angular-cookies": "~1.4.0",
"bootstrap": "~3.3.0",
"bootstrap-material-design": "~0.1.5",
"jquery": "~2.1.1",
"ngDialog": "~0.3.3",
"underscore": "~1.7.0",
"ionic": "^1.2.4",
"angular-resource": "^1.5.2",
"angular-google-chart": "^0.1.0",
"angular-ui-router-styles": "^1.1.0",
"angular-audio": "^1.7.2"
}
}
With these settings it is working on one of my machines since a few months. Today I tried to clone this repo on another machine and tried to set it up, but unfortunately ran into errors like $http(...).success is not a function & Error: transition superseded at $StateProvider.$get. Also, if I check in my developer console images are are not loaded.
I simply ran npm install ionic, npm install bower, npm install & then bower install. After that ionic serve
What I should do to run my project on these old settings without having to change my code?
UPDATE:
If I do angular.version in my developer console then I see full: "1.6.4", major: 1, minor: 6, dot: 4, codeName: "phenomenal-footnote" and for ionic.version: 1.2.4
however on old machine angular.version is 1.5.8 and ionic.version is 1.2.4
I have two version of grunt one global and one local.
grunt-cli v1.2.0
grunt v1.0.1
I want to uninstall v1.0.1.
When running grunt debug command it running successfully but while saving code am getting this fatal error:grunt.util._.contains is not a function.
bower.json
{
"name": "__",
"version": "__",
"devDependencies": {
"angular": "^1.5.5",
"angular-ui-router": "^0.2.18",
"angular-mocks": "^1.5.5",
"angular-bootstrap": "^1.3.2",
"ngstorage": "^0.3.10",
"bootstrap": "^3.3.6",
"angular-resource": "^1.2.28",
"ng-file-upload-shim": "^12.0.4",
"ng-file-upload": "^12.0.4"
},
"dependencies": {
"angularjs-slider": "^5.4.1"
}
}
package.json
{
"author": "....",
"name": "....",
"version": "1.0.0",
"homepage": ".....",
"licenses": {
"type": "MIT",
"url": "...."
},
"bugs": "....",
"repository": {
"type": "git",
"url": "..."
},
"dependencies": {},
"devDependencies": {
"grunt": "^1.0.1",
"grunt-bump": "0.0.6",
"grunt-coffeelint": "~0.0.10",
"grunt-contrib-clean": "^0.4.1",
"grunt-contrib-coffee": "^0.7.0",
"grunt-contrib-concat": "^0.3.0",
"grunt-contrib-copy": "^0.4.1",
"grunt-contrib-jshint": "^0.4.3",
"grunt-contrib-less": "~0.11.0",
"grunt-contrib-uglify": "^0.2.7",
"grunt-contrib-watch": "^0.4.4",
"grunt-conventional-changelog": "^0.1.2",
"grunt-html2js": "^0.1.9",
"grunt-karma": "^0.8.2",
"grunt-ng-annotate": "^0.8.0",
"karma": "^0.12.9",
"karma-coffee-preprocessor": "^0.2.1",
"karma-firefox-launcher": "^0.1.3",
"karma-jasmine": "^0.1.5"
}
}
It is due to incompatible grunt version, so I followed the below commands:
I Uninstalled Grunt:
>npm uninstall -g grunt
I Installed Grunt-cli:
>npm install -g grunt-cli
Then i checked the version:
>grunt --version
grunt-cli v1.2.0
grunt v1.0.1
I got the above response, but i needed grunt v0.4.5
Then i installed the needed grunt version:
npm install grunt#0.4.5 --save-dev
Now I don't get the above specified error.
when I run command 'bower install angular-ui-select' it gives me the error ECONFLICT unable to find suitable version for angular-bootstrap. my bower.json is as follows. my bower.json is as follows.
{
"name": "Analytics Tool",
"version": "1.0.0",
"authors": [
"Janith Widarshana"
],
"license": "IOS",
"homepage": "",
"ignore": [
"**/.*",
"node_modules",
"public/libs"
],
"dependencies": {
"jquery": "~2.1.x",
"jquery-ui": "~1.11.x",
"jquery-custom-scrollbar": "0.5.x",
"bootstrap": "~3.3.*",
"angular": "~1.4.*",
"angular-resource": "~1.4.*",
"angular-animate": "~1.4.*",
"angular-mocks": "~1.4.*",
"angular-bootstrap": "~2.1.*",
"angular-ui-utils": "~3.0.*",
"angular-ui-router": "~0.2.*",
"fontawesome": "~4.5.*",
"ngInfiniteScroll": "~1.2.*",
"angular-sanitize": "~1.4.*",
"underscore": "~1.8.3",
"angular-local-storage": "~0.2.x",
"flexslider": "~2.6.x",
"angular-google-maps": "^2.3.2",
"angular-file-upload": "^2.2.0",
"ng-table": "^0.8.3",
"iCheck": "icheck#^1.0.2",
"bootstrap3-dialog": "bootstrap-dialog#^1.35.1",
"angular-moment": "^0.10.3",
"angular-underscore-module": "^1.0.3",
"isteven-angular-multiselect": "~4.0.0",
"angular-ui-grid": "^3.1.1",
"crypto-js": "^3.1.6",
"angular-bootstrap-colorpicker": "^3.0.25"
}
}