Buffer.write is no longer supported in Node 6 in formidable dependency
I get this error when running restify on Node 6:
Buffer.write(string, encoding, offset[, length]) is no longer supported message=Buffer.write(string, encoding, offset[, length]) is no longer supported, stack=Error: Buffer.write(string, encoding, offset[, length]) is no longer supported
at Buffer.write (buffer.js:732:11)
at MultipartParser.initWithBoundary (.../node_modules/formidable/lib/multipart_parser.js:61:17)
Is it because restify depends on "formidable": "^1.0.14", and this bug is fixed in newer version of formidable. Can you please update the version to "^1.0.17" since restify doesn't work with "^1.0.14" anymore?
Related commit in formidable: https://github.com/felixge/node-formidable/commit/f4a3e08013b4387ec720f741204f8d3896c07b8b
You should automatically get latest since restify's package.json uses semver dependencies. You may have an older version installed already?
I have other dependencies that uses "formidable": "1.0.14" so I'll end up with [email protected] at the top-level node_modules and restify will use this depenency. But I fixed it somehow. Still, I think restify should update the formidable version to "^1.0.17" because it doesn't work with 1.0.14.
FWIW - I just did a fresh install of a project which uses restify, it has no dependencies on formidable other than restify itself, and it specified and downloaded 1.0.14.
├─┬ [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]