Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade Frontend Node Version #20

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

JuliusSkylerSladeUSDS
Copy link

@JuliusSkylerSladeUSDS JuliusSkylerSladeUSDS commented Jan 2, 2025

This has been tested on staging, and is running there now.

The changes in this PR allow us to maintain frontend/package-lock.json with lockFileVersion 2. package-lock.json is already lockFileVersion: 2 but the current version of Node used in Frontend is 12, which only writes lockFileVersion 1.

Updating frontend to Node 16 requires using a fork of react-loading-overlay which supports React 17... which this app already uses, but it wont build in Node 16 with the unforked package. Not sure how this worked before, but this is what I've discovered. Frontend wont build in Node > 16. I tried Node 18 but it wont build, and complains of gyp errors.

Additionally, this makes changes to api's local development to unify on a single Dockerfile. There is no production Dockerfile (in prod this runs in a buildpack) so unify and simplify on one that matches the GitHub Action build process.

I also changed the docker-compose config to not mount the local source code into the container because I find this easier to work with when testing different Node versions. But that's just me and someone in the future, maybe me, may want to change this back.

JuliusSkylerSladeUSDS and others added 2 commits January 22, 2025 09:38
This allows us to maintain package-lock.json with lockFileVersion 2.

Bump buildpack Node version to 16.

Updating to Node 16 requires using a fork of react-loading-overlay which supports React 17... which this app already uses, but it wont build in Node 16 with the unforked package. Not sure how this worked before, but this is what I've discovered.

Frontend wont build in Node > 16 so that what I've chosen. I tried Node 18 but it wont build, and complains of gyp errors.
Unify api Dockerfile. There is no production Dockerfile (in prod this runs in a buildpack) so unify and simplify on one that matches the GitHub Action build process.

Don't mount local source code into the container.
@JuliusSkylerSladeUSDS JuliusSkylerSladeUSDS marked this pull request as ready for review January 28, 2025 23:22
@JuliusSkylerSladeUSDS JuliusSkylerSladeUSDS requested review from ertzeid and wslack and removed request for ertzeid and wslack January 28, 2025 23:23
@JuliusSkylerSladeUSDS JuliusSkylerSladeUSDS changed the title Upgrade Node used by Frontend for local development Upgrade Frontend Node Version Jan 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants