

As an example I checked that npm was up-to-date, checked the version of an already installed package named yarn with the command npm list yarn and then updated the existing yarn package to the latest version with the command npm update yarn Then run npm -v to check if the version of npm is up-to-date. Replace your-username in the above command with your own username. After installing the node snap run the following command to enable npm update checking: sudo chown -R $USER:$(id -gn $USER) /home/ your-username/.config npm should be run outside of the node repl, in your normal shell. The node snap can be accessed by the command node, for example: $ node -vĪn up-to-date version of npm will installed as part of the node snap. Node can be installed with a single command, for example: sudo snap install node -classic -channel 11/stable Node.js versions 6, 8, 9, 10, 11, 13, 14, 15, 16, 17 and 18 are currently available, with the Snap Store being updated within hours or minutes of a Node.js release. Specific to Node.js, developers can choose from one or more of the currently supported releases and get regular automatic updates directly from NodeSource. Node.js is available as a snap package in all currently supported versions of Ubuntu.
