Closed evanrolfe closed 4 years ago
Hi @evanrolfe, thanks for the report.
This is supposed to work by using a dummy httptoolkit-server
binary, which runs but does nothing. That should be set up by setup-dev.js.
The goal here is to have the core desktop code be the same for all cases, so in the real app it runs the real server, and in dev it runs a stub server whilst your real server runs elsewhere.
I'm not sure why that's not working for you. I'm pretty sure it is working on my machine, so there must be a difference somewhere. Any chance you can look into it a little further?
That setup-dev.js
script should have been run by prestart:dev
, which gets run automatically by npm before npm run start:dev
. That should have created an httptoolkit-server/bin/httptoolkit-server
file, with a tiny script inside. Clearly the desktop app isn't finding or successfully running that script though.
Any idea which step has failed there? Can you see prestart:dev
running? Do you have the httptoolkit-server
folder in the root of your clone, does it have a runnable script inside?
Ok, I've found the issue. It looks likesetup-dev.js
is expecting me to have the httptoolkit-server
repo existing inside httptoolkit-desktop
? But what I had done was to clone the desktop, server and ui all to the same directory i.e.
~/Code/httptoolkit$ ls
httptoolkit-desktop httptoolkit-server httptoolkit-ui
So maybe the readme needs to make it clear that its expecting that structure?
Cheers
Ah, that would explain it. It definitely shouldn't be doing that! If there is no httptoolkit-server directory, it should create one from scratch, this sounds like a bug.
I'll try to look into this soon, but I'm currently trying to wrap up a million other things before Christmas. Any chance you've got a minute to open a PR that tweaks the script to fix this?
Fixed by #12
Hi, first of all great piece of software you have created. This is a tiny bug but occurs when you are following the READMEs to run this locally so might hinder people looking to contribute.
Steps to reproduce
npm start
npm run start:web
npm run start:dev
What happens You get an error:
This is because its trying to start the server even though the server is already running. The README says:
If I remove these lines then the desktop app starts fine. So I think maybe that just needs to be wrapped in an if statement to check if
start
orstart:dev
has been run.