install nodejs on Ubuntu
Option 1: NodeSource (system-wide, for production servers)
Good if you want a fixed version (LTS or Current).
-
Update your package index:
-
Add the NodeSource repository (replace
20.xwith18.xor22.xif you want a different line):
-
Install Node.js + npm:
-
Verify:

浙公网安备 33010602011771号