Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wired error #421

Closed
flauc opened this issue Nov 30, 2016 · 4 comments
Closed

Wired error #421

flauc opened this issue Nov 30, 2016 · 4 comments
Labels

Comments

@flauc
Copy link

flauc commented Nov 30, 2016

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 👍

@LinusU
Copy link
Member

LinusU commented Nov 30, 2016

Interesting, seems like the problem is in busboy...

You might be interested in trying out the alpha of 2.x, see #399

@flauc
Copy link
Author

flauc commented Nov 30, 2016

Thanks having a look 👍 .

Unfortunately I still get the same error with 2.0.0-alpha.2.

Do you maybe have an idea what might be causing the error, I just need something to focus on. I don't even know where to start looking.

@LinusU
Copy link
Member

LinusU commented Nov 30, 2016

Unfortunately I have no idea how this can be happening 🤔 It seems like the value of this.parser or self.parser is not what it's expecting it to be...

@ryhinchey
Copy link

I'm going to go ahead and close this issue as it's not clear if the issue is with multer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants