Skip to content

Wired error #421

@flauc

Description

@flauc

I get an error when using multer with Angular Universal. This repo precisely:

https://github.com/angular/universal-starter

This is the error:

TypeError: Cannot read property 'on' of undefined
    at new Multipart (C:\Users\Detectives\Desktop\Projects\universal-starter\node_modules\busboy\lib\types\multipart.js:288:5)

And this is the block that breaks:

  this.parser.on('drain', function() {
    self._needDrain = false;
    if (self._cb && !self._pause) {
      var cb = self._cb;
      self._cb = undefined;
      cb();
    }
  }).on('part', function onPart(part) {
    if (++self._nparts > partsLimit) {
      self.parser.removeListener('part', onPart);
      self.parser.on('part', skipPart);
      boy.hitPartsLimit = true;
      boy.emit('partsLimit');
      return skipPart(part);
    }

The same setup I'm using works perfectly fine in a simple envirement. If anyone could just point me in to a direction I'd appreciated it greatly since I've completely exhausted all of my ideas.

Thank you 👍

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions