Why dnf by default installs nodejs 16 on RHEL 9 ?

Solution Verified - Updated -

Issue

  • dnf/yum by default installs nodejs 16 version if no version provided.

    # dnf install nodejs 
    Updating Subscription Management repositories.
    Dependencies resolved.
    =======================================================================================================================================
    Package                     Architecture      Version                               Repository                                   Size
    =======================================================================================================================================
    Installing:
    nodejs                      x86_64            1:16.20.2-8.el9_4                     rhel-9-for-x86_64-appstream-rpms            116 k
    Installing dependencies:
    nodejs-libs                 x86_64            1:16.20.2-8.el9_4                     rhel-9-for-x86_64-appstream-rpms             15 M
    Installing weak dependencies:
    nodejs-docs                 noarch            1:16.20.2-8.el9_4                     rhel-9-for-x86_64-appstream-rpms            7.2 M
    nodejs-full-i18n            x86_64            1:16.20.2-8.el9_4                     rhel-9-for-x86_64-appstream-rpms            8.2 M
    npm                         x86_64            1:8.19.4-1.16.20.2.8.el9_4            rhel-9-for-x86_64-appstream-rpms            2.2 M
    
    Transaction Summary
    =======================================================================================================================================
    Install  5 Packages
    
  • How to install latest nodejs package ?

Environment

  • Red Hat Enterprise Linux 9
  • nodejs

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content