Missing shrinkwrap for Bower.
Bower must be >= 1.5 (tested on Bower 1.7.7).
- (within project directory)
npm install bower-shrinkwrap-resolver --save-dev
- Add
bower-shrinkwrap-resolver
resolver to.bowerrc
, like so:
{
"resolvers": [
"bower-shrinkwrap-resolver"
]
}
That's it.
If
bower
is installed globally -bower-shrinkwrap-resolver
have tonpm i -g ...
too. Otherwise you'll getCannot find module 'bower-shrinkwrap-resolver'
.
bower install
(with or without parameters) will automatically generate (and update) bower-shrinkwrap.json
.
CLI
--no-shrinkwrap
- ignore an available shrinkwrap file.--strict-shrinkwrap
- fail if bower tries to install dependency that is missing inbower-shrinkwrap.json
.--reset-shrinkwrap
- regeneratebower-shrinkwrap.json
(e.g.bower i --reset-shrinkwrap
is equivalent torm bower-shrinkwrap.json && bower i
).
Debug logging can be turned with
NODE_DEBUG=bower-shrinkwrap-resolver bower ...
.
You can turn off shrinkwrap generation by default by changing your .bowerrc
to
{
"resolvers": [
"bower-shrinkwrap-resolver"
],
"bower-shrinkwrap-resolver": {
"shrinkwrap": false
}
}
Adding --shrinkwrap
after bower install
will force shrinkwrap generation.
You can also set the value of strict-shrinkwrap
(false
by default).