I need to force bower to override a locally-defined dependency with a fresh copy. I assumed that bower update <package>
would do the trick (even with a little extra --force
). However, it stubbornly prefers whatever copy is installed under bower_components.
Consider the following layout (all in one codebase for now, sadly):
shared/bower.json
{ "name": "mysharedstuff", "version": "0.0.1", ... }
client1/bower.json
{ ... "dependencies": { "mysharedstuff": "../shared" } }
The only way I can get a fresh copy of shared/ is to explicitly delete the copy installed under bower_components. For example:
client1$> rm -rf bower_components/mysharedstuff client1$> bower install
Is this a bug with how bower handles versioning of local dependencies? Or am I missing something simple?
If there aren't that many bower packages you have installed, try writing bower install [package_name] --save . This will just update your bower. json file.
Bower has been deprecated by its creators The open source project continues to be maintained for the benefit of existing users, but this is a prime reason not to continue using the platform.
For updating a new and major version of the packages, you must install the npm-check-updates package globally. It will display the new dependencies in the current directory whereas running this command will list all the global packages which have new releases.
Just to update from the github issue you referenced.
bower --force update
will force update any packages in your bower.json. Works in Bower > v1.3.6
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With