Open vitstr opened 9 years ago
Im having a similar/same issue:
node -v :: v5.0.0 gulp -v :: 3.9.0 wiredep :: 2.2.2
events.js:141 throw er; // Unhandled 'error' event ^
Error: Error: angular is not installed. Try running
bower install
. at /Users/zac/PhpstormProjects/myApp/node_modules/wiredep/wiredep.js:30:56 at /Users/zac/PhpstormProjects/myApp/node_modules/wiredep/lib/detect-dependencies.js:145:29 at forOwn (/Users/zac/PhpstormProjects/myApp/node_modules/wiredep/node_modules/lodash/dist/lodash.js:2106:15) at Function.forEach (/Users/zac/PhpstormProjects/myApp/node_modules/wiredep/node_modules/lodash/dist/lodash.js:3303:9) at detectDependencies (/Users/zac/PhpstormProjects/myApp/node_modules/wiredep/lib/detect-dependencies.js:34:7) at wiredep (/Users/zac/PhpstormProjects/myApp/node_modules/wiredep/wiredep.js:70:39) at DestroyableTransform._transform (/Users/zac/PhpstormProjects/myApp/node_modules/wiredep/wiredep.js:135:34) at DestroyableTransform.Transform._read (/Users/zac/PhpstormProjects/myApp/node_modules/wiredep/node_modules/readable-stream/lib/_stream_transform.js:184:10) at DestroyableTransform.Transform._write (/Users/zac/PhpstormProjects/myApp/node_modules/wiredep/node_modules/readable-stream/lib/_stream_transform.js:172:12) at doWrite (/Users/zac/PhpstormProjects/myApp/node_modules/wiredep/node_modules/readable-stream/lib/_stream_writable.js:237:10)
Same issue here
gulp -v CLI version = 0.3.0 Local version = 3.9.0
node -v = v5.0.0
wiredep = 3.0.0-beta
events.js:141 throw er; // Unhandled 'error' event ^
TypeError: must start with number, buffer, array or string at fromObject (buffer.js:167:9) at new Buffer (buffer.js:58:10) at DestroyableTransform._transform (/home/sgw/public_html/sag/node_modules/wiredep/wiredep.js:135:23) at DestroyableTransform.Transform._read (/home/sgw/public_html/sag/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:184:10) at DestroyableTransform.Transform._write (/home/sgw/public_html/sag/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:172:12) at doWrite (/home/sgw/public_html/sag/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:237:10) at writeOrBuffer (/home/sgw/public_html/sag/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:227:5) at DestroyableTransform.Writable.write (/home/sgw/public_html/sag/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:194:11) at write (/home/sgw/public_html/sag/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:623:24) at flow (/home/sgw/public_html/sag/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:632:7)
Same exact thing as @corin12355 (same versions and all)
The fix can be made in wiredep.js
line 130:
opts.stream = {
src: file.contents.toString() || "",
it tries to load the stream with undefined because the file is blank, which causes the TypeError.
@iamhexcoder I found a fix, basically if a file is empty then it'll error out with a non-descriptive error. Just check your manifest for empty files.
agree with @brousalis
actually it could be anything except null or empty string
so, || ""
not works. something like || " "
works
I like your solution akleiber but coldkite's solution worked for me as well. Thanks!
PRs welcome
Got the same issue with an empty Google Analytics verification html file. Added one space to it as a temporary solution
Hi, guys!
I'm use:
I have two scss file in 'app/assets/styles/' folder. One file is empty. If run this code, wiredep return error.
Error text:
but, if run this code (without gulp stream), build is successful
It is bug or feature?) Thanks.