I'd like to use the angular-ui filters package and I'd like to install it through bower. I've run bower install --save angular-ui which installs it and inserts it into the bower.json file.
Unfortunately it doesn't seem to actually import the files into the project. I've already got ui.bootstrap in there, I can't find any instructions to install the filters part.
I've seen issues where the folder already exists in bower_components and so bower assumes that its already there and doesn't add the files.
bower uninstall angular-ui
check that the angular-ui folder isn't in bower-components and if it is then delete it.
bower install angular-ui --save
Related
I am working on a AngularJS project that uses bower as package manager and gulp to inject the dependencies into the index.html file. I am not very familiar with both of these tools.
I now want to use AWS AppSync, but it is not available as a bower package.
Currently the AWS SDK is specified as a file dependency in bower.json as:
"aws-sdk": "./thirdparty/script/aws-sdk-2.69.0.min.js",
When I install aws-appsync with npm npm install aws-appsync the node_modules folder for aws-appsync contains multiple js files in the lib directory.
How can I include these with bower or is there another way to do this altogether?
I am currently unable to change much of the build and dependency management process so any suggestions working with the current tools would be much appreciated.
Thanks for reaching out!
The Bower team itself has recommended that people migrate to npm or yarn, and so aws-appsync has not been pushed to Bower.
It might be worth investigating whether you can install directly from github using something like...
bower install <github url>.git
... and install directly from the appsync-sdk github repo.
In the end I hacked together an interim solution until I can move the whole project over to npm and browserify.
I added the aws-appsync package using npm and required it in a new file. This file is then passed through a gulp task that uses the browserify plugin. The added file is then included into the rest of the build process as before.
I have created an AngularJS application utilising the SB Admin 2 layout. I installed it via Bower, which also installed a lot of dependencies such as Flot.js and others. My question is, I don't use any of this extra libraries, how can I remove this unnecessary libraries?
command to uninstall a bower package
bower uninstall library-name
use --save to remove the same as a dependency from bower.json
bower uninstall library-name --save
Before uninstalling, Make sure that you have removed the respective module as a dependency in your angular application.
I downloaded a sample Angular app from
https://github.com/angular/material-start
When I open the index file I just get raw Angular syntax and the pages are not showing correctly.
How can I fix this?
You need to run bower to get your dependencies. Just downloading the repo is not enough.
http://bower.io/
Install bower, the in your repo run a bower init
You should see it grab Angular and other items needed.
You need to do the following command in the root directory of your git clone:
npm install
This does a bower install also. You need npm installed (packaged with nodejs)
I'm using the yeoman generator-gulp-angular to scaffold my app. I installed ng-18next with bower, and the package and it's dependency were both correctly installed in the bower_components directory. However, when I run gulp serve and view the source the components aren't being injected into page, so I get a module instantiation error. If I hard code the deps into the page there are no errors. I also tried bower install --save and the deps are inserted into the bower.json file correctly. Any ideas?
Thanks.
I had hard-coded script references in index.html. Even though they were commented, this caused them not to be injected with wiredep.
When I run yeoman install handlebars I get the following output:
Running "bower:install:handlebars" (bower) task
bower cloning git://github.com/components/handlebars.js
bower cached git://github.com/components/handlebars.js
bower fetching handlebars
It doesn't copy handlebars to the current project's plugins or vendors directory. It exits without an error message. Is this the right behaviour?
To me it seemed like a bug so I've created an issue on yeoman's github page. But I'm not sure.
To resolve this issue here's what I did. I realized yeoman did not install bower for me and it depends on bower for installing libraries. So, to resolve this issue - install bower manually like this: npm install bower -g