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 Node to 22 and update the dependenies to be compatible with node 22 as node v16 is depricated #554

Merged

Conversation

thesujai
Copy link
Contributor

@thesujai thesujai commented Oct 1, 2024

Linked Issue(s)

Fixes #553

Acceptance Criteria fulfillment

  • Upgrade and pin node to 22.x in both cli and webser
  • Upgrade the necessary dependency and run yarn install to ensure proper updates to yarn.lock file
  • Clean up node 16 from the repo

Proposed changes (including videos or screenshots)

NA

Further comments

NA

Dockerfile.dev Outdated
@@ -44,7 +44,9 @@ RUN mv /app/database-docker/db/ /app/ && rm -rf /app/database-docker/
RUN echo "host all all 0.0.0.0/0 md5" >> /etc/postgresql/15/main/pg_hba.conf
RUN echo "listen_addresses='*'" >> /etc/postgresql/15/main/postgresql.conf
RUN sed -i "s/^port = .*/port = ${DB_PORT}/" /etc/postgresql/15/main/postgresql.conf
RUN npm install --global yarn --force
RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - \
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure whether this was required or not. As the base image in this dockerfile is middlewareeng/oss-base, and I suppose this image is being built from Dockerfile.prebuilt(Where I upgraded to node 18)
If my understanding of the code is correct then changes to this file can be removed and a new commit can be made to middlewareeng/oss-base with the updates in the Dockerfile.prebuilt

I am not so sure about my understanding of this

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure whether this was required or not. As the base image in this dockerfile is middlewareeng/oss-base, and I suppose this image is being built from Dockerfile.prebuilt(Where I upgraded to node 18) If my understanding of the code is correct then changes to this file can be removed and a new commit can be made to middlewareeng/oss-base with the updates in the Dockerfile.prebuilt

I am not so sure about my understanding of this

yep. Not needed here

@thesujai thesujai changed the title Upgrade Node to 18 and update the dependenies to be compatible with node 18 as node v16 is depricated Upgrade Node to 22 and update the dependenies to be compatible with node 22 as node v16 is depricated Oct 1, 2024
Dockerfile.dev Outdated
Comment on lines 47 to 49
RUN curl -fsSL https://deb.nodesource.com/setup_22.x | bash - \
&& apt-get install -y nodejs \
&& npm install --global yarn
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this required in the dev setup, if we are already using the pre-built base image. This would slow down the dev process.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you push the pre-built base image with the latest changes so I can remove this one? As the old base image has node 16

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Push into dockerhub I mean

@adnanhashmi09
Copy link
Contributor

I will update the base image today @thesujai.

@thesujai thesujai force-pushed the node-upgrade-webserver-use-18.19.0 branch from 3b7284d to 48ac02f Compare October 7, 2024 07:00
@thesujai
Copy link
Contributor Author

thesujai commented Oct 7, 2024

Reverted it! @adnanhashmi09

@adnanhashmi09
Copy link
Contributor

adnanhashmi09 commented Oct 7, 2024

I have pushed the latest build with node 22 of oss-base. Please test your PR once and check if everything works. Please rebase and test your pr once. Seems to work fine for me.

@adnanhashmi09 adnanhashmi09 merged commit 410ebc0 into middlewarehq:main Oct 8, 2024
3 checks passed
@jayantbh jayantbh mentioned this pull request Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade Node to version 22
2 participants