node-restify icon indicating copy to clipboard operation
node-restify copied to clipboard

Buffer.write is no longer supported in Node 6 in formidable dependency

Open lukashavrlant opened this issue 10 years ago • 3 comments

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

lukashavrlant avatar Nov 16 '16 07:11 lukashavrlant

You should automatically get latest since restify's package.json uses semver dependencies. You may have an older version installed already?

DonutEspresso avatar Nov 17 '16 02:11 DonutEspresso

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.

lukashavrlant avatar Nov 17 '16 08:11 lukashavrlant

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] 

rrichardson avatar Feb 17 '17 18:02 rrichardson