Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When running
on latest master (1339313 as of writing) I encountered a few problems.
I found the simplest solution was to just use node
16.14
(see #34307), but I wanted to dig into why the latest version of node 16 wasn't working.The first error I encountered was
This was because of the
karma-selenium-webdriver-launcher
package. We are already using the newest version of this package, but that version is 7 years old. That package has"selenium-webdriver": "^2.44.0"
listed inpeerDependencies
.I forked the package and made a branch updating the peer dependency to use
"selenium-webdriver": ">=2.44.0"
I then updated the
package.json
to use my forked versionhttps://github.com/openedx/edx-platform/blob/5ff405e86133a922d080b2819e348a12827b0223/package.json#L108
and ran
npm install
.At this point I encountered a new error
which led me to https://stackoverflow.com/a/70086482
node-sass
specifies-std=c++0x
in the version we have installed (version 4) https://github.com/sass/node-sass/blob/v4.14.1/src/libsass.gyp#L106-L110, but also in latest master https://github.com/sass/node-sass/blob/6081731aac89ce4612fe4839d4c6329539c0d8e1/src/libsass.gyp#L106-L110, andremove_cv_t
was added in C++ 14 https://en.cppreference.com/w/cpp/types/remove_cvI tried using C++ 20 but encountered some C++ 20 specific errors, so I went back to 17.
C++ 20 Errors
I then ran
and everything worked.
I've updated the
Dockerfile
and thejs-tests.yml
workflow to use16.20
, and added theCXXFLAGS
to thenpm ci
lines in theDockerfile
andpavelib/prereqs.py
.