You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use GNU Make to update/install third party front end libraries.
My work flow is the following:
bower install [package] --save
Copy bower list --paths to Makefile as a variable. E.i. LIBRARIES
Create a new variable. E.g. LIBRARIES_TARGET := $(patsubst %,app/lib/%, $(notdir $(LIBRARIES)))
In my Makefile, I make LIBRARIES_TARGET a target which depend on LIBRARIES. If a library is not present in app/lib/[bower main file(s)], Make will run the following recipe: bower install $(notdir $@) --production. This can evaluate to bower install svg.js --productionandbower install svg.draggable.js --production.
This seems to trigger a lot of superfluous work by bower.
bower install should not re-install all packages from bower.json
I hope this is just dependency management but it look like bower is taking an abundant download route. GNU Make will run tasks in parallel. So 2 instances of bower is likely to run at the same time.
My entire Makefile (note, that I have replaced common GNU tools with the nodejs equivalent to support all nodejs platforms):
npm run bower -- install svg.js --production
npm run bower -- install svg.draggable.js --production
> virtualcontrol@ bower /home/dotnet/projects/playground/virtualcontrol
> bower "install" "svg.js" "--production"
> virtualcontrol@ bower /home/dotnet/projects/playground/virtualcontrol
> bower "install" "svg.draggable.js" "--production"
bower svg.draggable.js#~2.2.1 cached https://github.com/wout/svg.draggable.js.git#2.2.1
bower svg.draggable.js#~2.2.1 validate 2.2.1 against https://github.com/wout/svg.draggable.js.git#~2.2.1
bower svg.js#~2.3.5 cached https://github.com/wout/svg.js.git#2.3.5
bower svg.js#~2.3.5 validate 2.3.5 against https://github.com/wout/svg.js.git#~2.3.5
bower svg.js#* cached https://github.com/wout/svg.js.git#2.3.5
bower svg.js#* validate 2.3.5 against https://github.com/wout/svg.js.git#*
bower svg.draggable.js#* cached https://github.com/wout/svg.draggable.js.git#2.2.1
bower svg.draggable.js#* validate 2.2.1 against https://github.com/wout/svg.draggable.js.git#*
bower svg.js#~2.3.5 cached https://github.com/wout/svg.js.git#2.3.5
bower svg.js#~2.3.5 validate 2.3.5 against https://github.com/wout/svg.js.git#~2.3.5
bower svg.draggable.js#~2.2.1 cached https://github.com/wout/svg.draggable.js.git#2.2.1
bower svg.draggable.js#~2.2.1 validate 2.2.1 against https://github.com/wout/svg.draggable.js.git#~2.2.1
bower svg.js#^2.0.1 cached https://github.com/wout/svg.js.git#2.3.5
bower svg.js#^2.0.1 validate 2.3.5 against https://github.com/wout/svg.js.git#^2.0.1
bower svg.draggable.js#~2.2.1 install svg.draggable.js#2.2.1
bower svg.js#^2.0.1 install svg.js#2.3.5
bower svg.js#^2.0.1 cached https://github.com/wout/svg.js.git#2.3.5
bower svg.js#^2.0.1 validate 2.3.5 against https://github.com/wout/svg.js.git#^2.0.1
svg.draggable.js#2.2.1 bower_components/svg.draggable.js
└── svg.js#2.3.5
svg.js#2.3.5 bower_components/svg.js
bower svg.draggable.js#~2.2.1 install svg.draggable.js#2.2.1
bower skipped svg.draggable.js was not installed because there is already a non-bower directory with that name in the components directory (bower_components/svg.draggable.js). You can force installation with --force.
bower svg.js#^2.0.1 install svg.js#2.3.5
bower skipped svg.js was not installed because there is already a non-bower directory with that name in the components directory (bower_components/svg.js). You can force installation with --force.
svg.draggable.js#2.2.1 ../../../.cache/bower/packages/9857026e0b74f4ea1f206c5dc8911402/2.2.1
└── svg.js#2.3.5
svg.js#2.3.5 ../../../.cache/bower/packages/09c33df7193f0be8b28fda1d2550b945/2.3.5
npm run mkdirp -- app/lib/
> virtualcontrol@ mkdirp /home/dotnet/projects/playground/virtualcontrol
> mkdirp "app/lib/"
npm run cp -- bower_components/svg.js/dist/svg.js app/lib/svg.js
npm run cp -- bower_components/svg.draggable.js/dist/svg.draggable.js app/lib/svg.draggable.js
> virtualcontrol@ cp /home/dotnet/projects/playground/virtualcontrol
> cp "bower_components/svg.js/dist/svg.js" "app/lib/svg.js"
> virtualcontrol@ cp /home/dotnet/projects/playground/virtualcontrol
> cp "bower_components/svg.draggable.js/dist/svg.draggable.js" "app/lib/svg.draggable.js"
bower install is racy. Sometimes the install fails:
npm run bower -- install svg.js --production
npm run bower -- install svg.draggable.js --production
> virtualcontrol@ bower /home/dotnet/projects/playground/virtualcontrol
> bower "install" "svg.js" "--production"
> virtualcontrol@ bower /home/dotnet/projects/playground/virtualcontrol
> bower "install" "svg.draggable.js" "--production"
bower svg.draggable.js#~2.2.1 cached https://github.com/wout/svg.draggable.js.git#2.2.1
bower svg.draggable.js#~2.2.1 cached https://github.com/wout/svg.draggable.js.git#2.2.1
bower svg.draggable.js#~2.2.1 validate 2.2.1 against https://github.com/wout/svg.draggable.js.git#~2.2.1
bower svg.draggable.js#~2.2.1 validate 2.2.1 against https://github.com/wout/svg.draggable.js.git#~2.2.1
bower svg.js#~2.3.5 cached https://github.com/wout/svg.js.git#2.3.5
bower svg.js#~2.3.5 validate 2.3.5 against https://github.com/wout/svg.js.git#~2.3.5
bower svg.js#~2.3.5 cached https://github.com/wout/svg.js.git#2.3.5
bower svg.js#~2.3.5 validate 2.3.5 against https://github.com/wout/svg.js.git#~2.3.5
bower svg.js#* cached https://github.com/wout/svg.js.git#2.3.5
bower svg.js#* validate 2.3.5 against https://github.com/wout/svg.js.git#*
bower svg.draggable.js#* cached https://github.com/wout/svg.draggable.js.git#2.2.1
bower svg.draggable.js#* validate 2.2.1 against https://github.com/wout/svg.draggable.js.git#*
bower svg.js#^2.0.1 cached https://github.com/wout/svg.js.git#2.3.5
bower svg.js#^2.0.1 validate 2.3.5 against https://github.com/wout/svg.js.git#^2.0.1
bower svg.js#~2.3.5 install svg.js#2.3.5
bower svg.draggable.js#~2.2.1 install svg.draggable.js#2.2.1
bower svg.draggable.js#~2.2.1 install svg.draggable.js#2.2.1
bower svg.js#^2.0.1 install svg.js#2.3.5
bower ENOENT ENOENT: no such file or directory, lstat '/home/dotnet/projects/playground/virtualcontrol/bower_components/svg.js/.bower.json'
Stack trace:
/home/dotnet/projects/playground/virtualcontrol/node_modules/bower/lib/node_modules/fstream/lib/writer.js:285:28
FSReqWrap.oncomplete (fs.js:123:15)
Console trace:
Error
at StandardRenderer.error (/home/dotnet/projects/playground/virtualcontrol/node_modules/bower/lib/renderers/StandardRenderer.js:81:37)
at Logger.<anonymous> (/home/dotnet/projects/playground/virtualcontrol/node_modules/bower/lib/bin/bower.js:110:26)
at emitOne (events.js:96:13)
at Logger.emit (events.js:188:7)
at Logger.emit (/home/dotnet/projects/playground/virtualcontrol/node_modules/bower/lib/node_modules/bower-logger/lib/Logger.js:29:39)
at /home/dotnet/projects/playground/virtualcontrol/node_modules/bower/lib/commands/index.js:48:20
at _rejected (/home/dotnet/projects/playground/virtualcontrol/node_modules/bower/lib/node_modules/q/q.js:844:24)
at /home/dotnet/projects/playground/virtualcontrol/node_modules/bower/lib/node_modules/q/q.js:870:30
at Promise.when (/home/dotnet/projects/playground/virtualcontrol/node_modules/bower/lib/node_modules/q/q.js:1122:31)
at Promise.promise.promiseDispatch (/home/dotnet/projects/playground/virtualcontrol/node_modules/bower/lib/node_modules/q/q.js:788:41)
System info:
Bower version: 1.7.9
Node version: 6.7.0
OS: Linux 4.4.0-42-generic x64
npm ERR! Linux 4.4.0-42-generic
npm ERR! argv "/home/dotnet/.nvm/versions/node/v6.7.0/bin/node" "/home/dotnet/.nvm/versions/node/v6.7.0/bin/npm" "run" "bower" "--" "install" "svg.draggable.js" "--production"
npm ERR! node v6.7.0
npm ERR! npm v3.10.8
npm ERR! code ELIFECYCLE
npm ERR! virtualcontrol@ bower: `bower "install" "svg.draggable.js" "--production"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the virtualcontrol@ bower script 'bower "install" "svg.draggable.js" "--production"'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the virtualcontrol package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! bower "install" "svg.draggable.js" "--production"
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs virtualcontrol
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls virtualcontrol
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/dotnet/projects/playground/virtualcontrol/npm-debug.log
Makefile:22: recipe for target 'bower_components/svg.draggable.js/dist/svg.draggable.js' failed
make: *** [bower_components/svg.draggable.js/dist/svg.draggable.js] Error 1
make: *** Waiting for unfinished jobs....
svg.draggable.js#2.2.1 bower_components/svg.draggable.js
└── svg.js#2.3.5
svg.js#2.3.5 bower_components/svg.js
I would take a look but it's discouraging that you have 30 open PR's where most of them are a year old or older. I get a feeling that my hard work will never be merged.
I use GNU Make to update/install third party front end libraries.
My work flow is the following:
bower install [package] --save
bower list --paths
to Makefile as a variable. E.i.LIBRARIES
LIBRARIES_TARGET := $(patsubst %,app/lib/%, $(notdir $(LIBRARIES)))
LIBRARIES_TARGET
a target which depend onLIBRARIES
. If a library is not present inapp/lib/[bower main file(s)]
, Make will run the following recipe:bower install $(notdir $@) --production
. This can evaluate tobower install svg.js --production
andbower install svg.draggable.js --production
.This seems to trigger a lot of superfluous work by bower.
bower install should not re-install all packages from bower.json
I hope this is just dependency management but it look like bower is taking an abundant download route. GNU Make will run tasks in parallel. So 2 instances of bower is likely to run at the same time.
My entire Makefile (note, that I have replaced common GNU tools with the nodejs equivalent to support all nodejs platforms):
In a clean git clone of my project this triggers:
This is related to #256
Below is the entire output from bower:
bower install
is racy. Sometimes the install fails:My
bower.json
file:The text was updated successfully, but these errors were encountered: