Issue
we have a gitlab pipeline which builds an angular app with maven
but after the command npm install it downloads the installation files from internet rather than from our registry(nexus)
[INFO] Installing node version v16.13.2
[INFO] Downloading https://nodejs.org/dist/v16.13.2/node-v16.13.2-linux-x64.tar.gz to /builds/fadak/sgs-project/.m2/repository/com/github/eirslett/node/16.13.2/node-16.13.2-linux-x64.tar.gz
[INFO] No proxies configured
[INFO] No proxy was configured, downloading directly
this is the log, can anyone help?
Solution
apparently you have to specify download root for eirslett and also you have to configure it so it inherits proxy config from maven like this:
<npmInheritsProxyConfigFromMaven>true</npmInheritsProxyConfigFromMaven>
<nodeDownloadRoot>http://url/repository/npm-public/</nodeDownloadRoot>
<npmDownloadRoot>http://url/repository/npm-public/</npmDownloadRoot>
Answered By - Hani Bikdeli
Answer Checked By - Mildred Charles (JavaFixing Admin)