jeremyckahn / farmhand

A resource management game that puts a farm in your hand
https://www.farmhand.life
GNU General Public License v2.0
95 stars 23 forks source link

Show total price when buying/selling #479

Closed tim-phillips closed 5 months ago

tim-phillips commented 5 months ago

When buying from the store, it would be nice to see the total price before buying.

jeremyckahn commented 5 months ago

Excellent idea @tim-phillips. I've added this to the backlog. I should be able to get to it soon-ish, but let me know if this is something you'd like make a PR for!

tim-phillips commented 5 months ago

Thanks! I will if I can figure out this node-sass build issue. I swear I've been here before on another project.

jeremyckahn commented 5 months ago

Thanks! I will if I can figure out this node-sass build issue. I swear I've been here before on another project.

There might be a Node version mismatch. Are you using v18.12.1? https://github.com/jeremyckahn/farmhand/blob/6968f21f88aa6197c25cbcddc2d6723af8f7b01b/.nvmrc#L1

tim-phillips commented 5 months ago

So node-sass uses python under the hood and relies on distutils, which was removed in the python version I have on my system (v3.12). Once I downgraded to Python 3.11, I was able to run npm ci without issue.

For posterity, the error I was seeing was ModuleNotFoundError: No module named 'distutils', which took me a minute to figure out was python related.

tim-phillips commented 5 months ago

How would something like one of the following sit with you?

Screenshot 2024-01-29 at 2 55 08 PM Screenshot 2024-01-29 at 2 55 27 PM
jeremyckahn commented 5 months ago

So node-sass uses python under the hood and relies on distutils, which was removed in the python version I have on my system (v3.12). Once I downgraded to Python 3.11, I was able to run npm ci without issue.

For posterity, the error I was seeing was ModuleNotFoundError: No module named 'distutils', which took me a minute to figure out was python related.

Thanks for sharing your findings here! We may want to explore Dockerizing the dev server and build script so that others can avoid this. That's out of scope for this Issue, certainly.

How would something like one of the following sit with you?

Thanks for mocking these up @tim-phillips! I like this one as it's a bit simpler visually:

Screenshot 2024-01-29 at 2 55 27 PM
tim-phillips commented 5 months ago

Thanks for the direction, I'll put up a PR!