Skip to content

Could Not Detect Network on deploy.js - WSL & Ganache #34

Answered by LetsBuildAndCreate
Equious asked this question in Q&A

You must be logged in to vote

This is what worked for me 👍

OPTION 1: If you want to install & run Ganache on your WSL itself👇

  1. Install Ganache on WSL
    yarn add ganache

  2. Run Ganache
    yarn run ganache

  3. Copy the RPC URL (127.0.0.1:8545) from the bottom of the terminal screen that says RPC listening on 127.0.0.1:8545
    & paste it in the ethers.js JsonRpcProvider( ) function parameter.

  4. Also copy any Private key on scrolling up the Terminal Screen & paste it in the ethers.js Wallet( ) function parameter.

  5. Now let this terminal run in the background, since we want our Ganache server to be running.
    So open a new terminal & run the deploy.js file by running the below command:
    node deploy.js

OPTION 2: If you want to run Ga…

Replies: 16 comments 113 replies

You must be logged in to vote
1 reply
@Equious

You must be logged in to vote
47 replies
@ashwincs12

@wodeche

@OceanHL

@FreezingM

@w3zank

You must be logged in to vote
6 replies
@vish9812

@Ayush10

@Mohammad699

@drpc0101

@drpc0101

You must be logged in to vote
5 replies
@a14i12

@mariusdique

@yatinkhandelwal

@ashrth

@daniyaniazi

You must be logged in to vote
2 replies
@PatrickAlphaC

@Codeinor

You must be logged in to vote
1 reply
@MrAbuz

You must be logged in to vote
1 reply
@azhen1311

You must be logged in to vote
4 replies
@hrushigawade4

@shivnix

@uditrajawat

@BT5ZH

You must be logged in to vote
8 replies
@Fushiguro19

@ADK0010

@ghost

@NakeshTewari

@shawakash

You must be logged in to vote
37 replies
@ZamoRzgar

@shivamani-yamana

@sakshammishra112

@PatrickAlphaC

@chiefilion

Answer selected by PatrickAlphaC

You must be logged in to vote
1 reply
@Rwendo-snowden

You must be logged in to vote
0 replies

You must be logged in to vote
0 replies

You must be logged in to vote
0 replies

You must be logged in to vote
0 replies

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet