Answer the question
In order to leave comments, you need to log in
How to fix multiparty error?
Error when using multiparty
D:\node server template\node_modules\multiparty\index.js:81
self.on('newListener', function(eventName) {
^
TypeError: self.on is not a function
at Object.Form (D:\node server template\node_modules\multiparty\index.js:81:8)
at Server.<anonymous> (D:\node server template\server.js:381:33)
const form = multiparty.Form()
form.parse(req, function(err, fields, files) {
if (!err) {
console.log(fields)
} else {
console.log(err);
}
})
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question