Open abdullahwaheed opened 1 year ago
We have to update outdated packages like webpack, karma, etc to properly shift it node 18. Otherwise it is breaking with peerDependency issues
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
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.
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
@abdullahwaheed can you quickly summarize what is blocking the upgrade from node 16 to node 18 that you've been working on so far?
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
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: https://github.com/openedx/edx-platform/pull/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.
There's another issue with being able to regenerate package-lock.json
because of the npm-shrinkwrap.json
in edx-proctoring
We should remove fsevents
from that, as it causes npm ci
to fail with
npm ERR! code EBADPLATFORM
npm ERR! notsup Unsupported platform for fsevents@1.2.13: 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.
I made a draft PR upgrading to node 18 https://github.com/openedx/edx-platform/pull/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.
I've got a PR to add node 20, it looks like the current dependencies will work with both: https://github.com/openedx/edx-platform/pull/34998
Deprecation of Node 18 has been announced and will be accepted on July 4th
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