Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Node.js appears to be missing the multipart module

I am trying to parse form data, including upload files with a node.js http server. All of the tutorial type articles I have found use a require("multipart"); to include the multipart module, but when I try the same I get:

Error: Cannot find module 'multipart'

I also can't find it in the current api docs (though it is in the google cached version). So, has this module been removed from the standard installation or is there something else that does the job?

like image 522
Brenton Alker Avatar asked Apr 15 '10 11:04

Brenton Alker


3 Answers

Multipart.js is now standalone module.

like image 72
Kuroki Kaze Avatar answered Nov 13 '22 14:11

Kuroki Kaze


There is a better multipart parser now. You can find it at: http://github.com/felixge/node-formidable

like image 22
kvz Avatar answered Nov 13 '22 14:11

kvz


Run a cmd window, there go to the folder that contains the files where you are trying to use the multipart module. Then, run the following command:

npm install multipart

That's all.

like image 1
Matías Emanuel Toro Avatar answered Nov 13 '22 14:11

Matías Emanuel Toro