TypeError in Node 12
See original GitHub issueA 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:
- Created 4 years ago
- Reactions:2
- Comments:18 (11 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@gr2m travis.yml before_script hook using patch-package module.
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.