thomasstreet/famous-angular-starter

gulp-useref error throws during 'gulp build'

Closed this issue · 3 comments

Cloned the repo, ran npm install and bower install then ran gulp. I've tracked down the problem to line 47 in the build.js file: .pipe($.useref.assets()).

Got the following:

[gulp] Using gulpfile ~/production_apps/deleteme/gulpfile.js
[gulp] Starting 'clean'...
[gulp] Finished 'clean' after 62 ms
...
...
...
[gulp] Starting 'html'...
[gulp] gulp-size: total 8.49 kB
[gulp] Finished 'images' after 1.36 s

events.js:74
throw TypeError('Uncaught, unspecified "error" event.');
^
TypeError: Uncaught, unspecified "error" event.
at TypeError ()
at Transform.EventEmitter.emit (events.js:74:15)
at Transform. (/Users/mageemooney/production_apps/deleteme/node_modules/gulp-useref/index.js:71:42)
at Array.forEach (native)
at Transform. (/Users/mageemooney/production_apps/deleteme/node_modules/gulp-useref/index.js:61:35)
at Array.forEach (native)
at Transform. (/Users/mageemooney/production_apps/deleteme/node_modules/gulp-useref/index.js:43:36)
at Array.forEach (native)
at Transform._transform (/Users/mageemooney/production_apps/deleteme/node_modules/gulp-useref/index.js:40:23)
at Transform._read (/Users/mageemooney/production_apps/deleteme/node_modules/gulp-useref/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:184:10)

Any ideas? I'm a novice to gulp so I've not yet been able to track down what's going on.

Mac OSX Mavericks
node -v: v0.10.26
npm -v: 1.4.3
bower -v: 1.3.2
gulp -v:
[gulp] CLI version 3.6.2
[gulp] Local version 3.6.2

Found the same issue in gulp-useref repo (#20). Digging into it to find out what's triggering the error.

Error is thrown by useref when assets are missing. Resolved by restoring missing jquery and underscore dependencies in bower.json. Added the dependencies and updated my pull request with the correction.

This helped me, thank you!