Closed nickvanw closed 11 years ago
Hi, thanks for your report.
The installation warning is something weird in npm. The version syntax matches the documentation but still it doesn't seem to like v0.10.x.
For the other error I need more details.
I installed by doing: npm install youtube-feeds
The bug appears due to a small (coffeescript) function I have in my code to allow removal of array objects:
Array::remove = (e) -> @[t..t] = [] if (t = @indexOf(e)) > -1
This appears to conflict with
youtube-feeds.js:220
data[d].copy( buf, pos )
Removing it fixes the issue, however renaming it does not.
data[d]
are Buffer instances as received from the http
module. I can't help you with Coffeescript, but perhaps it converts data
array elements to strings (or some other type) which then loose their copy
method.
The Coffee function evaluates directly to this javascript:
(function() {
Array.prototype.remove = function(e) {
var t, _ref;
if ((t = this.indexOf(e)) > -1) {
return ([].splice.apply(this, [t, t - t + 1].concat(_ref = [])), _ref);
}
};
}).call(this);
This line in the Buffer docs is probably the reason:
While more efficient, it introduces subtle incompatibilities with the typed arrays specification. ArrayBuffer#slice() makes a copy of the slice while Buffer#slice() creates a view.
Long story short, I won't add support for CoffeeScript. But feel free to fork this repo and adjust to your own needs :)
Attempting to load the module running 0.10.5 results in this:
running the latest version from npm
When installing, this is given:
Which seems odd as I am >=0.10.0?