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 version #13117

Open
dacook opened this issue Feb 3, 2025 · 2 comments
Open

Upgrade Node version #13117

dacook opened this issue Feb 3, 2025 · 2 comments

Comments

@dacook
Copy link
Member

dacook commented Feb 3, 2025

For a long time we've been limited to Node v17.9.1, due to server versions of Ubuntu.

Our build says:

Warning: you are using an unstable release of Node.js (v17.9.1). If you encounter issues with Node.js, consider switching to an Active LTS release. More info: https://docs.npmjs.com/try-the-latest-stable-version-of-node

---- Blocked ----
Our current lowest server version is Ubuntu 18. Apparently you can't install Node 18+ due to glibc version. Maybe there's a way around it, but it's not standard and it would be better to spend that effort on upgrading old servers.

Impact and timeline

Although this version is no longer maintained, I don't think Node is public-facing on the server (it's only used for compiling JS) so it's probably safe.

At least one Javascript package is held back by this:

@dacook
Copy link
Member Author

dacook commented Feb 4, 2025

Confirmed that Node v18 doesn't work on Ubuntu 18 (fr_staging):

...
Installed node-v18.20.6-linux-x64 to /home/openfoodnetwork/.nodenv/versions/18.20.6

Installed postinstall/postuninstall package hooks for 18.20.6
Installing Yarn...
node: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by node)

And it does work on Ubuntu 20 (au_staging):

Installed node-v18.20.6-linux-x64 to /home/openfoodnetwork/.nodenv/versions/18.20.6

Installed postinstall/postuninstall package hooks for 18.20.6
Installing Yarn...
openfoodnetwork@au-staging:~/apps/openfoodnetwork/current$ node --version
v18.20.6

@dacook
Copy link
Member Author

dacook commented Feb 6, 2025

I just tried installing the latest version of Node on Ubuntu 20, and it works fine. So once we get past Ubuntu 18, we are unrestrained~ 🏎

openfoodnetwork@au-staging:~/apps/openfoodnetwork/current$ script/nodenv-install.sh
To follow progress, use 'tail -f /tmp/node-build.20250206034605.709959.log' or pass --verbose
Downloading node-v23.7.0-linux-x64.tar.gz...
-> https://nodejs.org/dist/v23.7.0/node-v23.7.0-linux-x64.tar.gz
Installing node-v23.7.0-linux-x64...
Installed node-v23.7.0-linux-x64 to /home/openfoodnetwork/.nodenv/versions/23.7.0

Installed postinstall/postuninstall package hooks for 23.7.0
Installing Yarn...
Correct Node version is installed.

Note that the plugin nodenv-yarn-install doesn't seem to have installed yarn, I'm not sure why.

openfoodnetwork@au-staging:~/apps/openfoodnetwork/current$ yarn --version
nodenv: yarn: command not found

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: All the things 💤
Development

No branches or pull requests

1 participant