IBM Support

Offline installation of PM2 fails with the "An error occurred while installing pm2@3.2.2" error message

Troubleshooting


Problem

When you install PM2, which is used by Design Room ONE, in an environment without an Internet connection, the result is the error: 
An error occurred while installing pm2@3.2.2

Symptom

The complete error message appears as follows:
=============================================================================
PM2 is licensed under GNU AGPL v3.0 (https://github.com/Unitech/pm2/blob/master/GNU-AGPL-3.0.txt).
Do you want to install pm2? [Y|n]
Installing pm2 from downloaded/pm2.npmbox...
 __
Unboxing downloaded/pm2.npmbox...
 __
  Unpacking downloaded/pm2.npmbox...
 __
  Installing pm2@3.2.2...
 __
An error occurred while installing pm2@3.2.2.
 __
pm2@3.2.2 was not installed.
  Done.
 __
  _
{Error: getaddrinfo ENOTFOUND registry.npmjs.org registry.npmjs.org:443_ _at errnoException (dns.js:50:10)_
_at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:92:26)_ _code: 'ENOTFOUND',_ _errno: 'ENOTFOUND',
_ _syscall: 'getaddrinfo',_   _hostname: 'registry.npmjs.org',_   _host: 'registry.npmjs.org',_ _port: 443,
_ _parent: 'rechoir'}
_ _
Process of unboxing downloaded/pm2.npmbox terminated unexpectedly!
=============================================================================

Cause

Unknown

Diagnosing The Problem

Resolving The Problem

WORKAROUND

The workaround consists of two sets of steps:

  • Online machine
  • Offline machine

Online machine:

  1. Install 
    pm2
    with the command: 
    npm install -g pm2@3.2.2
    (This step is not needed if you already ran the
    install-dr.js
    script according to the Installation Instructions at the DevOps Community DESIGN ROOM ONE site)
  2. Get the
    npm
    global directory with command: 
    npm config get prefix
  3. Change the directory to the one from Step 2 with the command:
    cd
  4. Create an archive of the contents of the sub folder: 
    node_modules/pm2
  5. Add all 
    pm2*.*
    files (for example,
    pm2.cmd
    ) from the folder in Step 2 to the archive

Offline machine:

  1. Copy the archive
  2. Get the
    npm
    global directory with the command: 
    npm config get prefix
  3. Change the directory to the folder in Step 2 of Offline machine with the command: 
    cd
  4. Extract a copy of the 
    pm2*.*
    files from the archive to the folder in Step 2 of Offline machine
  5. Extract
    pm2
    to the 
    node_modules
    sub folder of the folder in Step 2 of Offline machine

Document Location

Worldwide

[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSYK2S","label":"Rational Software Architect Designer"},"ARM Category":[{"code":"a8m0z000000bmSgAAI","label":"Rational Software Architect->Installation"}],"ARM Case Number":"","Platform":[{"code":"PF016","label":"Linux"},{"code":"PF033","label":"Windows"}],"Version":"All Version(s)","Line of Business":{"code":"LOB45","label":"Automation"}}]

Product Synonym

RSAD; DR ONE

Document Information

Modified date:
29 May 2020

UID

ibm11168714