NomicFoundation / hardhat

Hardhat is a development environment to compile, deploy, test, and debug your Ethereum software.
https://hardhat.org
Other
7.3k stars 1.41k forks source link

npx hardhat not showing a prompt #2070

Closed endrebak closed 3 years ago

endrebak commented 3 years ago

I'm trying to learn hardhat. I'd like to select the "new advanced project" option but no prompt is showing.

npx hardhat
mkdir hardhat-tutorial
cd hardhat-tutorial
npm init --yes
npm install --save-dev hardhat
npx hardhat

# Hardhat version 2.6.8
# 
# Usage: hardhat [GLOBAL OPTIONS] <TASK> [TASK OPTIONS]
# [...]

Instead of the hardhat version info I was expecting a prompt.

It worked the first time, but never again, no matter where I install it. I'm at my wit's end.

Using macOS.

Perhaps a fix is to add a npx hardhat initialize command?

alcuadrado commented 3 years ago

You already have a hardhat config file. User npx hardhat --verbose to figure out where.

We don't use issues for support questions, so i'm closing it. You can join our discord for this kind of question!

endrebak commented 3 years ago

Oh, I thought it was a bug. Thanks!

hamza33 commented 2 years ago

Oh, I thought it was a bug. Thanks!

Im at my wits end too, did you manage to get the prompt menu after 'npx hardhat' back to normal again?

and how? thanks

endrebak commented 2 years ago

npx hardhat --verbose

Then delete the config reported there :D

I only used hardhat for a homework assignment so cannot be of more help :/ Not using it anymore

On Tue, Dec 21, 2021 at 7:44 PM hamza33 @.***> wrote:

Oh, I thought it was a bug. Thanks!

Im at my wits end too, did you manage to get the prompt menu after 'npx hardhat' back to normal again?

and how? thanks

— Reply to this email directly, view it on GitHub https://github.com/nomiclabs/hardhat/issues/2070#issuecomment-999010788, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEHURUX5J6NP2T7JUBFI6O3USDDKBANCNFSM5ICCHWZQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you authored the thread.Message ID: @.***>

alekhya423p commented 2 years ago

i am also facing the same issue and when ever i enter npx hardhat i am not getting the promt to create a sample project instead it is showing the version and global options C:\Users\pichilialekhya\Desktop\SAMPLE NFT PROJECT\Hardhat\HardhatTutorial>npx hardhat Hardhat version 2.9.3

Usage: hardhat [GLOBAL OPTIONS] [TASK OPTIONS]

GLOBAL OPTIONS:

--config A Hardhat config file. --emoji Use emoji in messages. --help Shows this message, or a task's help if its name is provided --max-memory The maximum amount of memory that Hardhat can use. --network The network to connect to. --show-stack-traces Show stack traces. --tsconfig A TypeScript config file. --verbose Enables Hardhat verbose logging --version Shows hardhat's version.

AVAILABLE TASKS:

accounts Prints the list of accounts check Check whatever you need clean Clears the cache and deletes all artifacts compile Compiles the entire project, building all artifacts console Opens a hardhat console flatten Flattens and prints contracts and their dependencies help Prints this message node Starts a JSON-RPC server on top of Hardhat Network run Runs a user-defined script after compiling the project test Runs mocha tests

To get help for a specific task run: npx hardhat help [task]

tried many ways and still getting the same issue and npx hardhat is not creating the sample project..need help with this!!!thanks in advance..

ilyeshr commented 2 years ago

did you fid the solution ?

srivera145 commented 2 years ago

I'm having the same issues..so difficult to find help..

RohanNero commented 2 years ago

@ThePeoplesTokn @ilyeshr Did you guys try deleting the hardhat.config file? It worked for me. Like stated above, use npx hardhat --verbose to find where the file is located.

ilyeshr commented 2 years ago

Yes I did it and it fixed the problem thanks a lot

Le sam. 21 mai 2022 à 19:17, RohanNero @.***> a écrit :

@ThePeoplesTokn https://github.com/ThePeoplesTokn @ilyeshr https://github.com/ilyeshr Did you guys try deleting the hardhat.config file? It worked for me. Like stated above, use npx hardhat --verbose to find where the file is located.

— Reply to this email directly, view it on GitHub https://github.com/NomicFoundation/hardhat/issues/2070#issuecomment-1133746533, or unsubscribe https://github.com/notifications/unsubscribe-auth/AVJFREB7UMFJQ46ZMYEPQQ3VLESD3ANCNFSM5ICCHWZQ . You are receiving this because you were mentioned.Message ID: @.***>

mrhouzlane commented 2 years ago

I got the same problem :

  1. npx hardhat --verbose
  2. Check the PATH of the hardhat.config.js and delete it and then run :
  3. npx hardhat again in your folder. Worked !
RishiMalhotra920 commented 2 years ago

After running npx hardhat, I found that my terminal was in a different directory.

So I ran cd . to change directories and then ran npx hardhat again

mrhouzlane commented 2 years ago

any issues @RishiMalhotra920 ?

saurabh-lodha-16 commented 2 years ago

I am facing the same issues. I am using hardhat 2.12.2 and I can't see the prompt for creating an advanced hardhat project.

fvictorio commented 2 years ago

@saurabh-lodha-16 check this https://hackmd.io/@fvictorio/a-hardhat-faq#npx-hardhat-doesn%E2%80%99t-initialize-a-project