Closed tvld closed 1 year ago
I also run into the same issue, I manage to resolve it uninstalling @types/koa__multer and importing koa/multer like this let multer = require('@koa/multer');
let multer = require('@koa/multer'); // >> ??
Where would you do that? So you do not use types at all for koa then?
let multer = require('@koa/multer'); // >> ??
Where would you do that? So you do not use types at all for koa then?
I changed the import in the service where I'm using Multer for file uploads. I'm not using types only for Koa Multer because the TypeScript error seems to suggest an incompatibility between Koa Multer and Koa Body. There are certainly more elegant ways to solve the problem, but I needed a quick fix.
Seems I solved it by completely removing the package:
npm rm @types/koa__multer
Both npm run dev
and npm run compile
seems to be fine. Will test a bit more, but so far no complaints... hmm ))
I can confirm that all day working without npm rm @types/koa__multer
gave no errors... So, I suppose the package is not needed...
Tried to upgrade from v5.0.0 to v5.0.1 but that fails immediately. Serious breaking issue. Adding to the disaster: I can not seem to be able to downgrade :(
Same results after: