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

Wrong version of node in .nvmrc file #2873

Open
annimorphism opened this issue Sep 12, 2021 · 4 comments
Open

Wrong version of node in .nvmrc file #2873

annimorphism opened this issue Sep 12, 2021 · 4 comments

Comments

@annimorphism
Copy link

In the readme, the node versions show 12.19.0

$ node --version
v12.19.0
$ npm --version
6.14.8

But in the .nvmrc file, the default version is lts/dubnium. I am unable to install the gateway on my system with dubnium but it works smoothly with 12.19.0. Am I doing something wrong here?

My system: Macbook Pro 2015 with Big Sur

@Utopiah
Copy link

Utopiah commented Sep 17, 2021

Indeed, it's also not coherent with FROM node:12-buster-slim in https://github.com/WebThingsIO/gateway/blob/master/Dockerfile#L1

@benfrancis
Copy link
Member

@annimorphism Short answer, you can the latest LTS version of Node.js (v14):

$ nvm install --lts
$ nvm use --lts

Longer answer...

I see that @dyap2 updated the version in the README to v12 in #2601 but the version in .nvmrc is still v10 (dubnium).

Node v14 has been supported since 1.0.0 as noted in the release notes. I'm not exactly sure why .nvmrc is still at 10, but I suspect it's because some of the builds (Raspbian, Docker, .deb, .rpm etc.) are still using it.

We do need to upgrade everything from v10 to either v12 or v14, ideally in the next release, because as I understand it v10 stopped receiving security updates in April.

I see from @Utopiah's comment above that the Docker image appears to be using v12. My main concern is whether the current version of Raspbian/Raspberry Pi OS the base image is using supports the latest LTS version of Node, because we currently have no way to automatically upgrade users to a newer version (see #2801).

@Utopiah
Copy link

Utopiah commented Sep 20, 2021

Word of caution that this is for the gateway itself, add-ons might need to be re-installed and might not work after so probably safer to do that node version change while keeping an eye on the logs.

@benfrancis
Copy link
Member

My main concern is whether the current version of Raspbian/Raspberry Pi OS the base image is using supports the latest LTS version of Node, because we currently have no way to automatically upgrade users to a newer version

I note that the version of Node.js provided in the Raspbian Buster repo is v10, but since we install it using nvm in the build scripts it should be possible to specify a newer version https://github.com/WebThingsIO/gateway/blob/master/image/stage3/01-install-deps/01-run-chroot.sh#L12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants