angularartifactoryofflinenpm-publish

Publishing Angular packges in offline Artifactory instance fails because of wombat-dressing-room URL


I work in an offline network with Artifactory, and I want to publish Angular packages to that Artifactory environment.

For this, I use npm-offline-packager in my laptop, which has internet access to download all the Angular packages I need from npm.

I bring the files I need to the offline network, and then run this command:

npo publish packages123 -s -r http://url_Of_Jfrog_Artifactory

All the packages publish successfully, except for the Angular ones.

It shows me the error:

npm ERR! request to https://wombat-dressing-room.com/@angular%2fanimations failed, reason: getaddrinfo EAI_AGAIN wombat-dressing-room.appspot.com

How can I resolve this so that I can publish Angular packages?


Solution

  • The problem is that Angular packages have inside their package.json a key called "publishConfig" which calls to wombat-dressing-room. This is the reason you cant publish angular packages in an offline network.

    Solution: remove this key!

    For example, if you try to publish @angular/core, you need to follow these steps for each package:

    1. Extract @angular/core.tgz
    2. Go to package.json and remove the key publishConfig.
    3. Compress back to @angular/core.tgz

    I wrote a script in Python to run these three steps automatically on my offline environment.