Unable to run stacker.news locally #917
Replies: 62 comments 14 replies
They should still work. I usually only run the database as a container and run the app and worker via Looking at your logs, it seems like something is wrong with your database container: That's why the app container exits since it requires the db container to be up. I guess the same error shows up if you try to only get the database up with |
This is probably how we should setup our future dev env. Run app/worker locally and run all the other config-nightmare services in docker. |
|
Thanks for the answers.
I'm trying the other approach. Currently managed to run the database as a container ( |
|
Actually, while I was resolving the issues that i encountered when using the EDIT: My hunch seems confirmed, I had to run |
|
Cool. I'm going be putting a lot of effort into making this as easy as I can soon. If you have any more feedback I'd appreciate it! |
|
Well, if you are ok with more feedback, the new error I get is this one: I checked that EDIT: Seems like i need to locate the correct |
|
I tried mindlessly following the local development steps but it didn't work as well. It appears to be a different error so I'm not sure if I should open another issue. I'll try to debug exactly where the error happens later but, for now, here's a (not that helpful) screenshot. |
|
Hey, @huumn, here's a more detailed output. Let me know if you need more details. |
|
If you want, checkout this branch: https://github.com/stackernews/stacker.news/tree/localdev Then run It has a number of refinements to the docker setup that should make it more reliable and deterministic (in addition to populating db/search with a seed). |
|
Cool, I'm trying it at this moment! I'll tell how it went Right away it's showing a couple db errors like this one: but I don't know if it's going to affect the final build |
|
I'm trying to pinpoint where the problem happens but haven't found anything useful yet. But this Full log: |
|
You probably need to delete all of your existing containers. The db container needs to be rebuilt so it imports the db seed. |
|
Oh, makes sense. I'll try! Maybe adding a new command to sndev to reset the environment would help. Something like |
|
Hmm, I tried it. It didn't work but now at least it thew a different error... Not sure yet if it's good or bad though 😅 Unfortunately I will not have time to help you debug it today but at least I can throw a couple screenshots here. I also attached an asciinema recording with the output of |
|
Can you share your browser versions when you get a chance? |
|
I'm trying to run the I'm still trying things out so, for now, I'm only attaching a few screenshots of the parts that might be useful for debugging here. Let me know if you see anything suspicious in the logs |
The following error means that the variables
The error comes from here: stacker.news/api/search/index.js Lines 1 to 13 in 179a539
Mhh, I don't think we're doing anything special so I would say popular distros like Debian or Ubuntu sound like a good choice. |
Yeah, I tried on another machine with Lubuntu 22.04 and it gave me the same errors :/ Later today I'll try on another workstation with Debian 12. If it doesn't work, I'll try firing up a VM with a non-Debian based distro to see what happens... Maybe Fedora or Rocky Linux which are Red Hat based |
|
I also have a Mac Mini 2012 here somewhere. I think I'll try on it as well. Not today, maybe until the end of the week |
|
I think there should be some documentation on how to run the app without using Docker. Better yet if it's not necessary to run all the parts, maybe just the Simple step-by-step instructions like "install node v18.x.x, PostgreSQL vX and etc" I think it might make the dev environment easier to understand and get up and running, specially for devs without much experience that just want to make a quick small contribution I'd like to help with that and I already started it by extracting the relevant parts from the docker-compose and Docker files. But I don't have much free time so it might take some time. |
|
I'm trying with Docker again but now a new error has appeared. I still didn't have the time to try it on my mac mini Something related with me not having valid credentials to download I changed it from |
|
Oh weird. My understanding was that we could run imgproxy pro in dev without credentials. Hrm. Okay, I'll have to update that. Thanks! |
|
Okay, please pull and try again. 806f42e doesn't use imgproxy pro and sets the opensearch username and password now. |
|
I believe I just fixed the service worker error in 56c2682 |
|
I seem to be getting lucky today and now I haven't gotten any failures to run on dev because of an unhealthy container since our conversation last night, but I'll keep an eye out and report back if I have any more issues. |
|
on upon running I am seeing this error:
I am running orbstack on mac m series I edited the health command curl'ing google.com, though localhost:3000 doesn't have the site up |















Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Description
I wonder if the instructions here are still up to date. I don't seem to get the outcome that I would expect after running
docker-compose up --build.Steps to Reproduce
I followed the first two steps (installed docker-compose and cloned the project from github).
Expected behavior
I get these last 3 messages in my console logs. Attaching the full console logs here too.
log.txt
I would expect the app not to exit so that I can access the site at
localhost:3000.Environment:
If you only experience the issue on certain devices or browsers, provide that info.
All reactions