Closed lord-ne closed 1 year ago
I was able to get it to work with the npm-run-all
module, adding the following to package.json:
"server-start": "node node_modules/httptoolkit-server/bin/run start",
"start": "npm-run-all --parallel server-start start:web",
Looking into it further, basically none of the scripts in package.json are cross-platform, so I guess the answer is just don't use Windows.
On second thought, I'll reopen this, just so the dev can confirm that I'm understanding correctly
Yes, that's fair. Technically it's not a Windows problem: the current setup just assumes a POSIX shell, which means it'll work in effectively all shells on Linux & Mac, and it can work on Windows, but only works if you're using Git Bash/Cygwin/etc. Regardless, the end result is that running it in a normal Windows cmd
terminal won't work, yes.
This is a good suggestion, we should fix this. Can you open a PR to switch to npm-run-all
with a replacement that works for you?
Sounds good. I'll do a bit more work to try and get all the commands working, not just start
, before I open one.
I was trying to compile/run this repo following the instructions in the README, but I'm getting a lot of errors that I'm not sure how to deal with. I'm not sure exactly what I'm doing wrong.
I'm on Windows. I cloned the repo and ran
npm install
.Running
npm start
yields:When opening the actual local.httptoolkit.tech:8080 site in the browser (Firefox), it displays the "This is taking longer than normal" message, and a whole bunch and a bunch of errors appear in the console, including the following:
Error messages
``` Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://127.0.0.1:45456/start. (Reason: CORS request did not succeed). Status code: (null). ``` ``` proxy-store.ts:55 Server initialization failed TypeError: NetworkError when attempting to fetch resource. ``` ``` index.tsx:66 Service worker not supported, oh well, no autoupdating for you. ``` ``` index.tsx:129 Previous server version was null ``` ``` errors.ts:55 Reporting error: Error: Failed to initialize applicationSo it seems like the server isn't being run because of the first error, and I would then assume that all of the browser console errors are because the server isn't running. The error
'.' is not recognized as an internal or external command, operable program or batch file.
seems to indicate that this repo isn't set up to be run on Windows. Do I need to develop on Linux?