Closed dzoba closed 7 years ago
Looks like Buffer.alloc was added in 5.10.0 https://nodejs.org/api/buffer.html#buffer_class_method_buffer_alloc_size_fill_encoding
Ideally the package could work for many versions, but if not then this should be updated: https://github.com/kevva/to-ico/blob/master/package.json#L13
Can confirm. Module is used by https://github.com/jantimon/favicons-webpack-plugin; my webpack-dev-server build hangs and my webpack
build fails with that error as well.
Upgrading to Node 6 solved the problem, but not everyone can do so.
Buffer.alloc was backported to Node 4 as well. Make sure you have the latest LTS version.
Yup, should be available in Node.js 4 (since 4.5.0). See https://nodejs.org/dist/latest-v4.x/docs/api/buffer.html#buffer_class_method_buffer_alloc_size_fill_encoding.
Thank you @SamVerschueren and @kevva - you guys are totally right. Unfortunately we won't be able to update node versions for a couple weeks, so, in the mean time I've forked the relevant repos and reverted the change until we can update node. I'm leaving this note here to save anyone else some work who may be in the same boat.
https://github.com/dzoba/favicons-webpack-plugin -> https://github.com/dzoba/favicons -> https://github.com/dzoba/to-ico
And in package.json
"favicons-webpack-plugin": "git://github.com/dzoba/favicons-webpack-plugin.git",
There is an issue with the new release that is killing my build. It is with this line:
https://github.com/kevva/to-ico/blob/master/index.js#L15
This is the relevant part of the error:
I am using node 5.2.0