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

Reaction Admin - Upgrade node version to 18 #483

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

Conversation

sujithvn
Copy link

@sujithvn sujithvn commented Mar 3, 2023

Resolves #6396
Impact: major
Type: feature|chore

Issue

Reaction API is being upgraded to Node18. Make the same upgrade for Admin

Solution

Updated the Node version in Dockerfile to node:18.10.0-slim
Updated the CircleCI image from circleci/node:12.16.1-stretch to cimg/node:18.10.0

Breaking changes

Old versions Node 14/15 no longer supported

Testing

All automated tests should pass
Able to perform the basic admin activities related to adding products, publishing, viewing order etc.

Signed-off-by: Sujith <mail.sujithvn@gmail.com>
Signed-off-by: Sujith <mail.sujithvn@gmail.com>
@sujithvn sujithvn marked this pull request as ready for review March 3, 2023 11:47
Copy link
Contributor

@aldeed aldeed left a comment

Choose a reason for hiding this comment

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

I didn't test it, but are you sure the Meteor build supports Node 18? I thought they did not yet. It also isn't on the latest version of Meteor, so it might be a good idea to update Meteor, too.

If everything works, then I think it's fine.

You might want to also update the NPM version in the Dockerfile to the latest 9.x

@brent-hoover
Copy link
Collaborator

I think Meteor has its own internal version of Node so as long as it starts I think we're ok?

Meteor itself is usually years behind on their support of Node so I bet the current version is 16.x but we should keep Meteor up to date. Hopefully this thing goes away this year.

@sujithvn
Copy link
Author

sujithvn commented Mar 5, 2023

Yes, it seems the the internal Node version managed by Meteor is different from what we have in environment. Our current Meteor is v2.5. As per this changelog entry v2.5 is on Node 14.18.1. This matches with the output of meteor node -v command. The latest Meteor version is v2.10.0 and as per the changelog, v2.9.1 is on Node 14.21.2 and no bump after that.

So, similar to what we discussed for Jest/Node upgrade, I shall go ahead and straight away test with Meteor v2.10 and fix any broken pieces and then go through the breaking changes list to ensure nothing major is left out.

@sujithvn sujithvn changed the title Upgrade node version in docker to 18 Reaction Admin - Upgrade node version to 18 Mar 5, 2023
@aldeed
Copy link
Contributor

aldeed commented Mar 27, 2023

I have not worked with Meteor much lately, but my memory is that the internal Node.js version is for development only, and when you build the app for prod, you then need to correctly match that version. Their docs seem to indicate that is still true.

Depending on the version of Meteor you are using, you should install the proper version of node using the appropriate installation process for your platform. To find out which version of node you should use, run meteor node -v in the development environment, or check the .node_version.txt file within the bundle generated by meteor build. For example, if you are using Meteor 1.6, the version of node you should use is 8.8.1.

If you use a mis-matched version of Node when deploying your application, you will encounter errors!

Errors would only happen at run time, but if Meteor isn't using any deprecated APIs it might be fine. It's sad that they are so far behind, but it looks like their 3.0 release is all about removing Fibers and getting on to latest Node.

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.

3 participants