question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeError in Node 12

See original GitHub issue

A quick heads up, feel free to close once you acknowledge. The test suite does not pass under node 12 (both nock latest and beta channels).

Tested using node nighly build, installed using

NVM_NODEJS_ORG_MIRROR=https://nodejs.org/download/nightly/
nvm i node

Here’s the trace i’m getting when pre-testing my modules’ test suite relying on nock under node 12, same issue.

TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type function
    at Function.from (buffer.js:218:9)
    at OverriddenClientRequest.RequestOverrider.req.write (/node_modules/nock/lib/request_overrider.js:112:27)
    at OverriddenClientRequest.RequestOverrider.req.end (/node_modules/nock/lib/request_overrider.js:133:11)
    at handleRequest (/node_modules/got/source/request-as-event-emitter.js:211:14)
    at get (/node_modules/got/source/request-as-event-emitter.js:235:5)
    at Immediate.<anonymous> (/node_modules/got/source/request-as-event-emitter.js:306:10)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:18 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
panvacommented, Apr 24, 2019

@gr2m travis.yml before_script hook using patch-package module.

1reaction
panvacommented, Apr 24, 2019

I am now applying this patch to nock 10.0.6 to have my CI pass under node 12. It’s probably not the complete solution tho.

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeError - JavaScript - MDN Web Docs
TypeError is a serializable object, so it can be cloned with structuredClone() or copied between Workers using postMessage() . Constructor.
Read more >
How to Solve TypeError in JavaScript - AppDividend
TypeError in JavaScript may be thrown when the operand or argument passed to a function is incompatible with a type expected by that...
Read more >
'TypeError: is not a function' in Node.js - Stack Overflow
I'm fairly a beginner at Node JS so I managed to get this error by importing a ... And you need to call...
Read more >
Node.js Error Handling - TypeError - Airbrake Blog
Within the Node framework a TypeError indicates that a passed argument is not of the appropriate type. This method is used liberally throughout ......
Read more >
Error TypeError is not a function in Node js | Edureka Community
Hello @kartik,. Because of circular dependency, check if you have 2 classes that are requiring each other, remove one of them from requiring...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found