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

[no issue] fix host type #278

Merged
merged 4 commits into from
Feb 13, 2024
Merged

[no issue] fix host type #278

merged 4 commits into from
Feb 13, 2024

Conversation

n0thingness
Copy link
Contributor

@n0thingness n0thingness commented Feb 12, 2024

https://github.com/curvegrid/hardhat-multibaas-plugin/blob/main/src/deploy.ts#L62

const requestURL = new URL(path, this.mbConfig.host);

In order to not URL a URL, we should make the mbConfig host a string. Or alternatively, we could have modified the line above to do this.mbConfig.host.toString() before making it a URL again.

If we keep the type as a URL, then it is an extra import required in the hardhat config, so personally I think we should just make it a string.

@n0thingness n0thingness changed the title [noissue: fix host type [noi ssue] fix host type Feb 12, 2024
@n0thingness n0thingness changed the title [noi ssue] fix host type [no issue] fix host type Feb 12, 2024
@n0thingness
Copy link
Contributor Author

The problem only happens when using node v20 nodejs/node#50891
But the cause of the issue may not be node itself hapijs/wreck#305

Basically in src/deploy.ts, in request, accessing this.mbConfig is fine, but accessing this.mbConfig.host causes an error

TypeError: Cannot read private member #context from an object whose class did not declare it
    at Proxy.get href (node:internal/url:844:17)
    at Reflect.get (<anonymous>)
    at Object.get (/Users/danielbriskin/git/curvegrid/hardhat-multibaas-plugin/sample/node_modules/hardhat/src/internal/core/config/config-loading.ts:146:43)
    at Proxy.[nodejs.util.inspect.custom] (node:internal/url:785:21)
    at formatValue (node:internal/util/inspect:805:19)
    at inspect (node:internal/util/inspect:364:10)
    at formatWithOptionsInternal (node:internal/util/inspect:2298:40)
    at formatWithOptions (node:internal/util/inspect:2160:10)
    at console.value (node:internal/console/constructor:342:14)
    at console.log (node:internal/console/constructor:379:61)

Copy link
Contributor

@dahu33 dahu33 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀 🚀 🚀

@dahu33 dahu33 merged commit fccc45b into main Feb 13, 2024
@dahu33 dahu33 deleted the noissue-fix-host-type branch February 13, 2024 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants