taptapship / wiredep

Wire Bower dependencies to your source code.
MIT License
1.15k stars 142 forks source link

TypeError: must start with number, buffer, array or string :: Node version 4.1 #217

Closed fedescarpa closed 8 years ago

fedescarpa commented 9 years ago

I get this error when I run the next code with node 4.1.x. it works with node 0.12.x

gulp.src(src.html).pipe(wiredep.stream({ ignorePath: /^(\.\.\/)+/ }))

Error:

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 (./node_modules/wiredep/wiredep.js:136:23)
    at DestroyableTransform.Transform._read (./node_modules/wiredep/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:184:10)
    at DestroyableTransform.Transform._write (./node_modules/wiredep/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:172:12)
    at doWrite (./node_modules/wiredep/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:237:10)
    at writeOrBuffer (./node_modules/wiredep/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:227:5)
    at DestroyableTransform.Writable.write (./node_modules/wiredep/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:194:11)
vitstr commented 9 years ago

@fedescarpa src.html is empty? I have a similar problem.. https://github.com/taptapship/wiredep/issues/219

fedescarpa commented 9 years ago

@vitstr No, src.html is a glob 'src/*/.html', is not empty

krnlde commented 9 years ago

No no no, he means the content of one of the final HTML files from the glob or whatever. For me it was the problem. So thank you @vitstr , though the error message could be improved for that one.

reddeadpixel commented 8 years ago

I experienced the problem with having a empty SASS partial file. Seems wiredep doesn't like it to have empty files in it's stream, but it won't throw an error if you insert a space or new line in the empty file.

I agree with @krnlde that the error message on this one could be improved. If @vitstr didn't mentioned abt an empty file, I probably still was searching for a needle in a haystack. Thanks!

cetrobo commented 8 years ago

i have the same problem as you , how can i fix it ?

nvjot94 commented 8 years ago

thankssssssssssss.............................