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

BUG?? #1777

Closed
2 tasks
andress134 opened this issue Jul 7, 2021 · 2 comments
Closed
2 tasks

BUG?? #1777

andress134 opened this issue Jul 7, 2021 · 2 comments
Labels
invalid The author did not follow the template / not a Got issue

Comments

@andress134
Copy link

Describe the bug

  • Node.js version: v14.17.2
  • OS & version: debian 9

Actual behavior

...

Expected behavior

/root/node_modules/got/dist/source/core/index.js:1346
this[kRequest].emit('upload-complete');
TypeError: Cannot read property 'emit' of undefined

Code to reproduce

...

Checklist

  • I have read the documentation.
  • I have tried my code with the latest version of Node.js and Got.
@szmarczak szmarczak added the invalid The author did not follow the template / not a Got issue label Jul 7, 2021
@phawxby
Copy link

phawxby commented Nov 24, 2022

@szmarczak we're having the same issue with V11.8.5 and I think it might be related to usage of msw. I notice the code is different between V11 and V12, is that due to a bug being patched or general refactoring?

    TypeError: Cannot read properties of undefined (reading 'emit')

      at node_modules/got/dist/source/core/index.js:1364:36
      at node_modules/@mswjs/interceptors/src/interceptors/ClientRequest/NodeClientRequest.ts:172:9

I'd love to move our project over to ESM and upgrade got to see but sadly the trigger on that has been pulled far too early to be feasible for us.

@szmarczak
Copy link
Collaborator

@phawxby What's the code behind line 1364 (in 11.8.5 it's just a bracket)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid The author did not follow the template / not a Got issue
Projects
None yet
Development

No branches or pull requests

3 participants