What are you trying to achieve or the steps to reproduce?
Old versions of @hapi/hoek clone their options argument. We pass in a proxy element which contains a URL object. As of Node v20, the URL object can not be deep copied just by copying members as this breaks private members. @hapi/hoek deep clones its options object. This is silly (and the NodeJS authors say it's a REALLY bad idea) but they are locked into that design pattern.
@hapi/hoek@11.0.4 introduces a special case to handle URL copying.
Unless @hapi/hoek dependency is updated, this module is unusable from NodeJS v20 onwards.
What was the result you got?
err: TypeError: Client request error: Cannot read private member #context from an object whose class did not declare it
(This error is being thrown by the NodeJS url.js builtin because @hapi/hoek@10 is broken)
Context
What are you trying to achieve or the steps to reproduce?
Old versions of @hapi/hoek clone their options argument. We pass in a proxy element which contains a URL object. As of Node v20, the URL object can not be deep copied just by copying members as this breaks private members. @hapi/hoek deep clones its options object. This is silly (and the NodeJS authors say it's a REALLY bad idea) but they are locked into that design pattern. @hapi/hoek@11.0.4 introduces a special case to handle URL copying.
Unless @hapi/hoek dependency is updated, this module is unusable from NodeJS v20 onwards.
What was the result you got?
err: TypeError: Client request error: Cannot read private member #context from an object whose class did not declare it (This error is being thrown by the NodeJS url.js builtin because @hapi/hoek@10 is broken)
What result did you expect?
No error