-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Default Develop port to match metamask & ganache-cli default port #1579
Conversation
Gotta make sure that all the boxes are updated (config, docs, client, etc.) after this is merged. |
@@ -83,7 +83,7 @@ var command = { | |||
|
|||
var ganacheOptions = { | |||
host: "127.0.0.1", | |||
port: 9545, | |||
port: 8545, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we do this! If Ganache is already running, then truffle develop
will fail to start, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be prudent to error out and let the user know something like "Looks like you already have Ganache running on port 8545. Either change the port or turn off Ganache and try the command again."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The whole point of truffle develop
is that it's low friction. That's why we chose 9545 for truffle develop
in the first place and 7545 for Ganache UI
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gnidan but you almost never have both running, and I've spoken with many dapp developers in the community that agree with me on this. You always end up having to change the port in your frontend or elsewhere. They should all be 8545 in my opinion and I'd fight for this one very strongly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gnidan in v5/next/develop the current behavior is that truffle develop
doesn't clash (out of the box) with ganache-cli or ganacheUI.
on this branch/PR, truffle develop
doesn't clash with ganacheUI out of the box, but if ganache-cli
is already running and you try to spin up truffle develop
, it'll clash and throw an error (because of the timestamped network_id's ganache-cli is given). However, if you spin up truffle develop
and then start up ganache-cli
, truffle will auto-connect to ganache-cli
.
(This is awaiting discussion / requirements gathering) |
Closing this for now as #1773 seems to be the current reasonable compromise. 😎 |
@CruzMolina Cool to see this being addressed. Was just wondering if you don't mind outlining what would be the recommended path forward for teaching beginners then? Just want to make sure it's spelled out clearly so that there's no confusion on what to do. |
@adrianmcli I just looked over the "Getting Started With Drizzle And React" tutorial. There's a discrepancy w/ MM's UI (on 6.2.2 on Chrome). Currently you have to set If their intent is to support
|
Opened an issue w/ MM regarding the above noted issue at: MetaMask/metamask-extension#6321 |
Per @adrianmcli's feedback
Defaults
truffle develop
to use Metamask & ganache-cli's default port (8545) when no network configuration is defined.Should allow a user to unbox a
drizzle
box, calltruffle develop
, and connect using MM out of the box.(Should pass tests and build successfully once v4 test leftovers are updated)