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

Update rosetta to node 18 on phet-server-dev #405

Open
Tracked by #407
mattpen opened this issue May 9, 2023 · 3 comments
Open
Tracked by #407

Update rosetta to node 18 on phet-server-dev #405

mattpen opened this issue May 9, 2023 · 3 comments
Assignees

Comments

@mattpen
Copy link
Contributor

mattpen commented May 9, 2023

When rosetta is ready to be upgraded to node 18 on phet-server-dev, the systemd file /usr/lib/systemd/system/rosetta.service should point to /home/phet-admin/.nvm/versions/node/v18.16.0/bin/npm instead of /usr/local/bin/npm.

This should be done before node 16 end of life on 09-11-2023 - https://github.com/nodejs/release#release-schedule

EDIT: if you wait a while to do this, the minor and/or maintenance versions of node may have changed, please check the target before hard coding 18.16.0 using which node in an interactive shell for phet-admin. Note: sudo -u phet-admin which node will report the node version for your user, not phet-admin. It's required that phet-admin's .bashrc has been loaded in the current shell, for example you could run sudo -i -u phet-admin then which node.

@jbphet
Copy link
Contributor

jbphet commented May 12, 2023

@liammulh and I discussed this and did a little initial work on it, and he is going to take it from here. I'm going to unassign myself for now.

@jbphet jbphet removed their assignment May 12, 2023
@liammulh liammulh mentioned this issue May 23, 2023
14 tasks
@liammulh
Copy link
Member

I tried changing the rosetta.service file today on phet-server2, and it didn't work. After changing the path to npm like MP suggested above, I ran sudo systemctl daemon-reload, then sudo systemctl restart rosetta. When I did, it failed. I am not sure why.

A few notes for posterity:

  • The rosetta.service file wasn't in /usr/lib/systemd/system/. It was in /etc/systemd/system/.
  • The rosetta.service file uses /home/phet-admin/.nvm/versions/node/v16.14.2/bin/npm. It does not use /usr/local/bin/npm.
  • When changing the Node version, you also have to change the Environment key so that it has the correct npm in its PATH.

@liammulh liammulh assigned mattpen and unassigned liammulh May 24, 2023
@liammulh
Copy link
Member

Hey, it looks like Node 18 isn't available yet:

$ nvm ls
       v14.18.2
->     v16.14.2
         system
default -> 16 (-> v16.14.2)
iojs -> N/A (default)
unstable -> N/A (default)
node -> stable (-> v16.14.2) (default)
stable -> 16.14 (-> v16.14.2) (default)
lts/* -> lts/gallium (-> v16.14.2)
lts/argon -> v4.9.1 (-> N/A)
lts/boron -> v6.17.1 (-> N/A)
lts/carbon -> v8.17.0 (-> N/A)
lts/dubnium -> v10.24.1 (-> N/A)
lts/erbium -> v12.22.12 (-> N/A)
lts/fermium -> v14.19.1 (-> N/A)
lts/gallium -> v16.14.2

@mattpen, Rosetta is running on Node 18 using my Mac computer. I haven't seen any issues. @jbphet also is able to run Rosetta + Node 18 on Windows, so we are pretty confident it is ready once phet-server2 has Node 18 installed.

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