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 JS from 16 to 20 #31937

Closed
4 of 5 tasks
Tracked by #353 ...
abdullahwaheed opened this issue Mar 16, 2023 · 12 comments
Closed
4 of 5 tasks
Tracked by #353 ...

Upgrade Node JS from 16 to 20 #31937

abdullahwaheed opened this issue Mar 16, 2023 · 12 comments
Assignees
Labels
maintenance Routine upkeep necessary for the health of the platform needs maintainer attention Issue or PR specifically needs the attention of the maintainer.

Comments

@abdullahwaheed
Copy link
Contributor

abdullahwaheed commented Mar 16, 2023

Abstract
Node 16's support will end on September 11, 2023. So we have to upgrade node JS to v18 before that. - We've now upgraded all released software to Node 18.

Node 18 support will end on Apr 2025. So we have to get to node 20 before Sumac.

Extras
Project should use .nvmrc to have a consistent node version
We have to update Readme accordingly.

Upgrade Node JS from 16 to 18

@abdullahwaheed
Copy link
Contributor Author

We have to update outdated packages like webpack, karma, etc to properly shift it node 18. Otherwise it is breaking with peerDependency issues

@jmbowman
Copy link
Contributor

There are several GitHub Action upgrades that haven't been merged yet, some of them state that they now use Node 20 as the default environment. Are we blocked on those upgrades until this is done, or can those be merged independently? https://github.com/openedx/edx-platform/pulls?q=is%3Apr+is%3Aopen+dependabot

@feanil
Copy link
Contributor

feanil commented Nov 27, 2023

Those can be merged independently because the environment the action uses for itself does not impact the version of node we setup for our testing during the run of the action.

@feanil feanil moved this to Todo in Maintenance Feb 8, 2024
@feanil feanil changed the title Upgrade Node JS from 16 to 18 Upgrade Node JS from 16 to 20 Feb 8, 2024
@feanil
Copy link
Contributor

feanil commented Feb 8, 2024

Given that we need to get to Node 20 now anyway, I've updated this ticket to aim for Node 20 instead of Node 16

@feanil
Copy link
Contributor

feanil commented Feb 27, 2024

@abdullahwaheed can you quickly summarize what is blocking the upgrade from node 16 to node 18 that you've been working on so far?

@feanil feanil moved this to In Progress in Maintenance Feb 27, 2024
@feanil feanil added maintenance Routine upkeep necessary for the health of the platform needs maintainer attention Issue or PR specifically needs the attention of the maintainer. labels Feb 27, 2024
@abdullahwaheed
Copy link
Contributor Author

while upgrading to Node 18, we faced compatibility issues with some packages, that uses webpack, since edx-platform uses webpack 2 while currently webpack is at v5. More details can be found out here

@brian-smith-tcril
Copy link
Contributor

The first thing I tried when looking into this was upgrading from node 16.14 to node 16.20

I encountered a few issues and worked through them (details in this PR: #34308)

One of the main issues is https://www.npmjs.com/package/karma-selenium-webdriver-launcher, which has "selenium-webdriver": "^2.44.0" as a peer dep, and edx-platform has "selenium-webdriver": "3.4.0", as a dev dep.

@brian-smith-tcril
Copy link
Contributor

There's another issue with being able to regenerate package-lock.json because of the npm-shrinkwrap.json in edx-proctoring

https://github.com/openedx/edx-proctoring/blob/b73cf9f0689288a87fef58dcf90534b633737da4/npm-shrinkwrap.json#L4416-L4434

We should remove fsevents from that, as it causes npm ci to fail with

npm ERR! code EBADPLATFORM
npm ERR! notsup Unsupported platform for [email protected]: wanted {"os":"darwin"} (current: {"os":"linux"})
npm ERR! notsup Valid os:  darwin
npm ERR! notsup Actual os: linux

I'm currently working around this in my node 18 testing branch by manually removing it from the edx-platform package-lock.json file.

@brian-smith-tcril
Copy link
Contributor

I made a draft PR upgrading to node 18 #34311

I've managed to get it to a point where webpack 5 builds everything properly, and most (but not all) of the js tests in CI are passing.

@abdullahwaheed abdullahwaheed removed their assignment May 13, 2024
@feanil feanil removed this from Maintenance Jun 13, 2024
@feanil
Copy link
Contributor

feanil commented Jun 18, 2024

I've got a PR to add node 20, it looks like the current dependencies will work with both: #34998

@feanil feanil self-assigned this Jun 20, 2024
@feanil
Copy link
Contributor

feanil commented Jun 25, 2024

Deprecation of Node 18 has been announced and will be accepted on July 4th

@feanil
Copy link
Contributor

feanil commented Dec 5, 2024

The PR to drop node 18 testing and the relevant DEPR have both been closed.

#35342
#35015

@feanil feanil closed this as completed Dec 5, 2024
@github-project-automation github-project-automation bot moved this from In progress to Closed in Frontend Working Group Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Routine upkeep necessary for the health of the platform needs maintainer attention Issue or PR specifically needs the attention of the maintainer.
Projects
Status: Closed
Development

No branches or pull requests

4 participants