Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
B

bower

> 包管理
Open source

A package manager for the web

14.9K stars0 likes4 views
WebsiteGitHub

About

A package manager for the web

Bower - A package manager for the web

..psst! While Bower is maintained, we recommend yarn and webpack or parcel for new front-end projects!


Bower offers a generic, unopinionated solution to the problem of front-end package management, while exposing the package dependency model via an API that can be consumed by a more opinionated build stack. There are no system wide dependencies, no dependencies are shared between different apps, and the dependency tree is flat.

Bower runs over Git, and is package-agnostic. A packaged component can be made up of any type of asset, and use any type of transport (e.g., AMD, CommonJS, etc.).

View complete docs on bower.io

View all packages available through Bower's registry.

Install

bash
$ npm install -g bower

Bower depends on Node.js and npm. Also make sure that git is installed as some bower packages require it to be fetched and installed.

Usage

See complete command line reference at bower.io/docs/api/

Installing packages and dependencies

bash
# install dependencies listed in bower.json
$ bower install

# install a package and add it to bower.json
$ bower install <package> --save

# install specific version of a package and add it to bower.json
$ bower install <package>#<version> --save

Using packages

We discourage using bower components statically for performance and security reasons (if component has an upload.php file that is not ignored, that can be easily exploited to do malicious stuff).

The best approach is to process components installed by bower with build tool (like Grunt or gulp), and serve them concatenated or using a module loader (like RequireJS).

Uninstalling packages

To uninstall a locally installed package:

bash
$ bower uninstall <package-name>

prezto and oh-my-zsh users

On prezto or oh-my-zsh, do not forget to alias bower='noglob bower' or bower install jquery\#1.9.1

Never run Bower with sudo

Bower is a user command; there is no need to execute it with superuser permissions.

Windows users

To use Bower on Windows, you must install Git for Windows correctly. Be sure to check the options shown below:

Note that if you use TortoiseGit and if Bower keeps asking for your SSH password, you should add the following environment variable: GIT_SSH - C:\Program Files\TortoiseGit\bin\TortoisePlink.exe. Adjust the TortoisePlink path if needed.

Ubuntu users

To use Bower on Ubuntu, you might need to link nodejs executable to node:

bash
sudo ln -s /usr/bin/nodejs /usr/bin/node

Configuration

Bower can be configured using JSON in a .bowerrc file. Read over available options at bower.io/docs/config.

Support

You can ask questions on following channels in order:

  • StackOverflow
  • Issue Tracker
  • [email protected]

Contributing

We welcome contributions of all kinds from anyone. Please take a moment to review the guidelines for contributing.

  • Bug reports
  • Feature requests
  • Pull requests

Note that on Windows for tests to pass you need to configure Git before cloning:

bash
git config --global core.autocrlf input

Backers

Support us with a monthly donation and help us continue our activities. [Become a backer]

Issues· 15 open

View all issuesOpen on GitHub
  • #2638

    Bower

    Updated Jul 15, 2026
  • #2637

    Illegally created

    Updated May 22, 2026
  • #2633

    Bower's role in 2025

    Updated Jan 15, 2025
  • #2629

    Bower install fails with exit code of #128 fatal: unable to access 'https://github.com/...'

    Updated Oct 14, 2023
  • #2628

    unable to push my repo

    Updated Oct 7, 2023
  • #2627

    CERT HAS EXPIRED

    Updated Jun 27, 2023
  • #2626

    Ubuntu server 22.04 errors

    Updated Jun 7, 2023
  • #2625

    CERT_HAS_EXPIRED Request to https://registry.bower.io/packages/jquery

    Updated May 19, 2023
  • #2624

    bower angular-resource#~1.3.7 CERT_HAS_EXPIRED Request to https://registry.bower.io/packages/angular-resource failed: certificate has expired

    Updated May 2, 2023
  • #2621

    Update "mout" dependency

    Updated Dec 8, 2022

> Tags

JavaScriptbowerfront-endjavascriptpackage-manager

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedOct 1, 2026
Category包管理
PricingOpen source

> Related tools

N
npm
Node.js 默认包管理器
P
pnpm
高效节省磁盘的 Node 包管理器
I
is-gif
Check if a Buffer/Uint8Array is a GIF image