Got the following error:
[email protected] install /tmp/test/node_modules/sharp
node-gyp rebuild
/tmp/test/node_modules/sharp/node_modules/tar/lib/pack.js:32
const EOF = Buffer.alloc(1024)
^
TypeError: Buffer.alloc is not a function
at Object.
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object.
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
gyp: Call to 'GLOBAL_VIPS_VERSION="" node -e "require('./binding').use_global_vips()"' returned exit status 1. while trying to load binding.gyp
gyp ERR! configure error
seems like 0.18.x version is using a newer tar module which is not compatible with node 4.x
installing 0.17.x works fine.
Added in commit ec617f2, thanks for the report!
I'm still getting this error in node 6.10 on AWS builds.
```
/builds/project/node_modules/sharp/node_modules/tar/lib/pack.js:32
const EOF = Buffer.alloc(1024)
^
TypeError: Buffer.alloc is not a function
at Object.
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object.
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
gyp: Call to 'GLOBAL_VIPS_VERSION="" node -e "require('./binding').use_global_vips()"' returned exit status 1. while trying to load binding.gyp
ERROR: Job failed: exit code 1```
@stevensacks Buffer.alloc was added in v5.10.0 (and backported to Node v4.5.0).
The Changelog for Node v6.0.0 also mentions its availability.
Yeah. I'm definitely confused about this. Not sure why I'm getting this error on builds.
@stevensacks I was stuck on this for a while, just wanted to let you know what I did:
Use NVM to get latest version of Node (I went to latest - 8.1.2)
nvm use node
npm install
and now everything is fine 馃憤
Most helpful comment
Added in commit ec617f2, thanks for the report!