-
Notifications
You must be signed in to change notification settings - Fork 225
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
Migrate cwa-website to use node16 #2282
Conversation
Hi Mike, thanks for this PR! I have some questions: Could you elaborate on the consequences for contributors? Do I need to update to node16 manually when this change is merged? Anything else I should note with node16? |
Thank you for your questions. If you continue to use Nodejs 14 you will get a warning if you run
You can still use the commands to build and run the web locally,
For anybody who is contributing only text inputs to the repository, they could continue to use Nodejs 14 in the interim, however it would be recommended to update to Nodejs 16 at some time. Anyone who is updating package versions or doing more technical work should probably update to Nodejs 16 before making any significant contributions. |
Okay, thanks for the explanations @MikeMcC399! |
This comment has been minimized.
This comment has been minimized.
In the meantime Node Also there are some new minor versions of some npm packages. If there is interest in pursuing this PR I will update and test it with the newer patches and minor versions, otherwise I leave it as it is. |
@MikeMcC399 Indeed, there is interest in pursuing this PR! Thanks! |
That is good to hear! I will update the PR soon in that case (rebase / re-install / re-test). |
@dsarkar |
Rebased once again to resolve conflicts with |
Oh damn @MikeMcC399 I just did a manual merge conflict as well, currently looking into getting it running with node16 |
Do you want me to force push again? Sorry that we were working in parallel! |
Let me check again that all is working on node 16, then I will update the branch once more. |
@MikeMcC399 you can continue what you were working on. I wanted to fix the merge conflict and then test it using
After that, I wanted to have it deployed to the non-productive test environment for a quick review |
@svengabr |
It would be good to run those tests manually, however in fact they are already checked automatically (see https://github.com/corona-warn-app/cwa-website/pull/2282/checks). To your test suite, I suggest to add:
to run the Cypress test suite. I just did that, with the following result: Spec Tests Passing Failing Pending Skipped ┌────────────────────────────────────────────────────────────────────────────────────────────────┐ │ ✔ applink_spec.js 00:02 3 3 - - - │ ├────────────────────────────────────────────────────────────────────────────────────────────────┤ │ ✔ blog_spec.js 00:03 2 2 - - - │ ├────────────────────────────────────────────────────────────────────────────────────────────────┤ │ ✔ check_anchor_links.js 01:26 31 31 - - - │ ├────────────────────────────────────────────────────────────────────────────────────────────────┤ │ ✔ check_links.js 15:07 31 31 - - - │ ├────────────────────────────────────────────────────────────────────────────────────────────────┤ │ ✔ hotline_spec.js 915ms 1 1 - - - │ ├────────────────────────────────────────────────────────────────────────────────────────────────┤ │ ✔ pages/eventRegistration.js 00:10 6 6 - - - │ └────────────────────────────────────────────────────────────────────────────────────────────────┘ ✔ All specs passed! 16:51 74 74 - - -
|
@svengabr |
@MikeMcC399 looks all good to me. Is anything missing from your side/any open tasks or can we consider merging into |
There are no open tasks on my side, so you are welcome to go ahead and merge into (There is no |
Rebased and retested successfully on Ubuntu 20.04 and Windows 11
|
@MikeMcC399 |
Thank you for letting me know. I will not touch the PR unless you ask me to. I have retested the current contents on Ubuntu and Windows 11 successfully. @Ein-Tim |
@svengabr I can offer to test this on my Mac Book Air running the latest macOS version. @MikeMcC399 If I test this PR, I'd need to install node16, right? |
Yes, you need node 16 to test with node 16 😆 Conversation continued in Slack.... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change breaks building the page locally on my M1 MacBook.
The terminal says:
Error: Node Sass does not yet support your current environment: OS X Unsupported architecture (arm64) with Node.js 16.x
In sass/node-sass#3033 you can read that Node Saas does not yet support Apple ARM.
However, it seems like I can continue using Node.js version 14.18.3 without having any difficulties to build the page. I'm not even seeing a warning message like the one @MikeMcC399 posted above.
So from my POV, this is not an optimal change, however, I also won't block it.
I just started to wonder: Aren't we already using Node Saas currently? If yes, I wonder why I only see this message when testing this PR and not when building the Edit: The error message actually speaks from Node.js 16, so maybe Node Saas was updated, etc.? |
Your error message is part of the problem that Node Sass is deprecated (see https://www.npmjs.com/package/node-sass). "node-sass Warning: LibSass and Node Sass are deprecated. While they will continue to receive maintenance releases indefinitely, there are no plans to add additional features or compatibility with any new CSS or Sass features. Projects that still use it should move onto Dart Sass." I'm sorry that I didn't realise that macOS users like yourself could be impacted. It is possible to migrate to Dart Sass but this means some other technical changes to the website. I did try it out a couple of months ago and I would have suggested it at the time if it had been 100% compatible. |
No problem. As stated above, this is not optimal for me, but I will just continue to use Node.js 14.18.3. I hope this works! |
Delaying a little bit (later today) until I have internal results using a M1 macbook |
A colleague just tested using an M1 Macbook with NodeJS 16 and everything worked as intended with no errors. From my perspective, we are good to go. |
I wonder what caused this error then. |
That would be helpful. I suggest to open a new issue to look at this after this PR is merged. |
I suggest to begin with just do:
without upgrading to nvm 16. That seems to be no problem on Windows at least. |
@MikeMcC399 I'll try this now. |
FYI: I will follow up in #2411. |
This PR follows on from issue #2155 "Website migration steps for Nodejs 16" and implements the steps required to migrate this repository to use Nodejs version 16.
The Nodejs version selected is
lts/gallium
which is equivalent to the cached version 16.13.2 specified in the Ubuntu 20.04.3 LTS - ReadmeI have tested it locally on Ubuntu 20.04 and Windows 11 with the Cypress test suite.
I also tested the workflows on a private clone of the repository. The only portion I cannot test is the final deployment in deploy-master.yml using
jakejarvis/s3-sync-action@master
.Internal Tracking ID: EXPOSUREAPP-10928