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

npx hardhat gobind #14

Closed
senthilbalablockchain opened this issue Oct 4, 2023 · 3 comments · Fixed by #17
Closed

npx hardhat gobind #14

senthilbalablockchain opened this issue Oct 4, 2023 · 3 comments · Fixed by #17
Assignees
Labels
bug Something isn't working

Comments

@senthilbalablockchain
Copy link

I get this error when I do npx hardhat gobind

TypeError: Cannot set property crypto of #<Object> which has only a getter

@jlvandenhout
Copy link

jlvandenhout commented Feb 14, 2024

I can reproduce this by initializing the default Typescript Hardhat project using yarn hardhat init, adding the @solarity/hardhat-gobind plugin as described and running yarn hardhat compile.

Node v20.8.0
Yarn v4.1.0
Hardhat v2.20.0
@solarity/hardhat-gobind v1.1.1

$ yarn hardhat compile
An unexpected error occurred:

TypeError: Cannot set property crypto of #<Object> which has only a getter
    at Object.<anonymous> (/home/develop/mre/gobind/node_modules/@solarity/hardhat-gobind/src/abigen/wasm/wasm_exec_node.js:17:18)
    at Module._compile (node:internal/modules/cjs/loader:1241:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1295:10)
    at Object.require.extensions.<computed> [as .js] (/home/develop/mre/gobind/node_modules/ts-node/src/index.ts:1608:43)
    at Module.load (node:internal/modules/cjs/loader:1091:32)
    at Function.Module._load (node:internal/modules/cjs/loader:938:12)
    at Module.require (node:internal/modules/cjs/loader:1115:19)
    at require (node:internal/modules/helpers:130:18)
    at Object.<anonymous> (/home/develop/mre/gobind/node_modules/@solarity/hardhat-gobind/src/abigen/generator.js:1:1)
    at Module._compile (node:internal/modules/cjs/loader:1241:14)

@helperShang
Copy link

same error, how to fix ?

@Arvolear
Copy link
Member

Arvolear commented Mar 7, 2024

@helperShang Hey, you may need to downgrade the Node version (to 18.*.*) for now. We are working on resolving this issue.

@Arvolear Arvolear added the bug Something isn't working label Mar 7, 2024
@KyrylR KyrylR mentioned this issue Mar 8, 2024
@Arvolear Arvolear linked a pull request Mar 9, 2024 that will close this issue
@Arvolear Arvolear closed this as completed Mar 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants