PowerWire.eu

Independent IBM i, AIX and Linux news and tech tips for Europe and beyond

  • Home
  • News
  • Technical Articles
    • IBM i
    • AIX
    • Linux
    • VIOS
  • Subscribe
  • About Us
  • Contact Us
  • Advertise with PowerWire.eu

Bye Bye NodeVer!

October 31, 2020 by Andy Youens Leave a Comment

For those of us using Node.js on our IBM i, you are probably aware of an Open Source utility, provided by IBM, called NodeVer (Is that Node Ver? or is it Nod Ever?, I’ll leave it with you to call it whatever you like!).

NodeVer was a great utility allowing you to have more than one version of node.js installed on your box and use a specific version.

On my server I have Node.js version 8 and version 10 installed and NodeVer allows me to switch between the two.

Please be aware, if I change the version, it will be a global change and effect all users – be sure before you change versions!

Now we have all got used to using NodeVer, IBM has decided to call a day on it.

Running NodeVer

If you are not familiar with NodeVer, let me have a quick recap on the functionality of NodeVer.

NodeVer was available from IBM in their Open Source repositories.

We can see from the figure below, I have NodeVer installed along with Node.js version 8 and 10.

If I run NodeVer list, it shows me the two node versions I have just spoken about, which can be seen below.

For those of you with 20-20 vision, you will see on the screen shot above, that in fact NodeVer now uses the update-alternative package. 

Which leads me neatly onto …

What do we use instead?

Good question, and the answer is Update-Alternatives.  There is no way I can split that up into different sayings!

Update-Alternatives has been around, on other operating systems for a long while and not only used for different versions of Node, but it can also be used on other languages too.

  1. If I run nodever –version it shows the current version of NodeVer is 1 and is now depreciated
  2. Nodever recommends using update-alternatives as a substitute for NodeVer
  3. Update-alternatives shows its installed at version 1.19.7

As with nodever, update-alternatives can be installed on a command line using:

yum install update-alternatives

Or you could use ACS Open Source Package Management feature to install this package.

Either way will get the job done and we now have the newer method of selecting what version of node to use for our applications.

Using Update-Alternatives

As I said earlier, due to client restraints, we use Node.js at version 8 for our applications. 

  1. Node version – 8.17
  2. Using alternatives with the config parameter and specifying node as the programming language
  3. Here we can see my two versions of node.js 8 and 10
  4. If I want to change to node version 10, I will input a 1 here

As you can see, update-alternatives can be shortened to just alternatives – nice!

Last Step

As we now have a replacement for NodeVer, is can safely be removed from our server.  Again, either use Yum from a shell session to achieve this, or good old Open Source Package Management.

Be aware – I did the above on our server and by removing NodeVer it also removed Node.js 10, as it was a dependency! 

Luckily, we do not use Node 10!  Is that intended IBM?  I have raised a PMR on it, just in case.

Conclusion

Yes, NodeVer will continue to work, but it is not getting any updates, so my best advice is to start using the better tool for the job Update-Alternatives. 

You will benefit from it in the future, especially if you use open source programming languages other than Node.js, for example Python.

If you have any questions, either on this article, or any other open source, use the comments below, or send me a message on twitter @AndyYouens

Andy Youens is an IBM i consultant/instructor at Milton Keynes, UK-based FormaServe Systems with over 40 years IBM midrange experience.

Filed Under: IBM i, Technical Articles Tagged With: #IBMi, Andy Youens, Power Systems

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Free monthly newsletter signup

News

A screen a story – Not our problem anymore

Last week I ran into an issue, which did teach me something new about the command WRKPRB. After checking a … [Read More...]

Raspberry Pi and Machine Learning

In my last article, I demonstrated how I used Machine Learning on the Raspberry Pi to determine if a … [Read More...]

Shield Advanced Solutions – new Messaging and Monitoring solutions

September 2022 – Toronto As Shield Advanced Solutions celebrates the significant milestone, 25 years of … [Read More...]

More articles from this section

Quick Links

  • Advertise
  • Subscribe

Follow Us…

  • Email
  • LinkedIn
  • Twitter

Search This Website

Copyright © 2023 · Cue Communications · All Rights Reserved

Log in