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

WARNING: You are currently using Node.js v22.0.0 #5179

Open
engdanilo opened this issue May 5, 2024 · 1 comment
Open

WARNING: You are currently using Node.js v22.0.0 #5179

engdanilo opened this issue May 5, 2024 · 1 comment
Assignees
Labels
status:needs-more-info There's not enough information to start working on this issue

Comments

@engdanilo
Copy link

Version of Hardhat

2.22.3

What happened?

I have a problem to compile Open Zeppelin library

https://github.com/NomicFoundation/hardhat/assets/51862854/b73aabcc-32bf-4d0b-862a-4d82658dbd85

The hardhat error informs that I am using node v22.0.0, but I don't have it installed in my Linux.

Minimal reproduction steps

I am trying to compile a simple smart contract, my node.js is v20.12.2, but when I apply "npx hardhat compile", I receive this message:

WARNING: You are currently using Node.js v22.0.0, which is not supported by Hardhat. This can lead to unexpected behavior. See https://hardhat.org/nodejs-versions

I applied on my Terminal to list all node versions in my linux Ubuntu:
nvm ls

And there is no node version 22.0.0 in my computer:

v20.0.0
-> v20.12.2
system
default -> 20 (-> v20.12.2)
iojs -> N/A (default)
unstable -> N/A (default)
node -> stable (-> v20.12.2) (default)
stable -> 20.12 (-> v20.12.2) (default)
lts/* -> lts/iron (-> v20.12.2)
lts/argon -> v4.9.1 (-> N/A)
lts/boron -> v6.17.1 (-> N/A)
lts/carbon -> v8.17.0 (-> N/A)
lts/dubnium -> v10.24.1 (-> N/A)
lts/erbium -> v12.22.12 (-> N/A)
lts/fermium -> v14.21.3 (-> N/A)
lts/gallium -> v16.20.2 (-> N/A)
lts/hydrogen -> v18.20.2 (-> N/A)
lts/iron -> v20.12.2

Because of this I have this problem to use Open Zeppelin library, with this error:

TypeError: No arguments passed to the base constructor. Specify the arguments or mark "DREX" as abstract.
--> contracts/DREX.sol:7:1:
|
7 | contract DREX is ERC20, Ownable {
| ^ (Relevant source part starts here and spans across multiple lines).
Note: Base constructor parameters:
--> @openzeppelin/contracts/access/Ownable.sol:38:16:
|
38 | constructor(address initialOwner) {
| ^^^^^^^^^^^^^^^^^^^^^^

TypeError: No arguments passed to the base constructor. Specify the arguments or mark "REAL" as abstract.
--> contracts/ERC20.sol:7:1:
|
7 | contract REAL is ERC20, Ownable {
| ^ (Relevant source part starts here and spans across multiple lines).
Note: Base constructor parameters:
--> @openzeppelin/contracts/access/Ownable.sol:38:16:
|
38 | constructor(address initialOwner) {
| ^^^^^^^^^^^^^^^^^^^^^^

Error HH600: Compilation failed

For more info go to https://hardhat.org/HH600 or run Hardhat with --show-stack-traces

Search terms

hardhat WARNING: You are currently using Node.js v22.0.0

@schaable
Copy link
Contributor

schaable commented May 6, 2024

Hi @engdanilo, I don't seem to be getting the same error:

image

Can you provide a minimal reproducible example?

@schaable schaable added status:needs-more-info There's not enough information to start working on this issue and removed status:triaging labels May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:needs-more-info There's not enough information to start working on this issue
Projects
Status: Backlog
Development

No branches or pull requests

2 participants