Answers: <p>Part one is a failure to install <a href="https://github.com/nodejs/node-gyp" rel="nofollow noreferrer">node-gyp</a>. The error is a connection timeout to some ipaddress:</p>
  <pre><code>stack Error: connect ETIMEDOUT dummy-ip-address:443 
  </code></pre>
  <p>The second error is because chrome is not installed on the Jenkins Agents where you are running the build.</p>
  <pre><code>09 08 2022 01:13:36.358:ERROR [launcher]: No binary for Chrome browser on your platform.
    Please, set &quot;CHROME_BIN&quot; env variable.
  npm ERR! code ELIFECYCLE
  npm ERR! errno 1
  npm ERR! CUSTOM/LIBRARY/WE/CAN/IGNORE/THIS-ui@4.1.0 test:jenkins: `ng test --code-coverage --watch false --progress false`
  npm ERR! Exit status 1
  </code></pre>
  <p>Neither of these are really &quot;Jenkins&quot; issues.</p>
  
Answers: CC BY-SA 4.0
Answers: 2022-08-09T23:14:37.007Z
Answers: 2022-08-09T23:14:37.007Z
Answers: Levi
Body: <p>I'm new to Jenkins environment.</p>
  <p>I was asked to upgrade <strong>Angular 7.x</strong> app which was built 3 to 5 yrs back into <strong>Angular 13</strong>. Upgrading the Angular app is done. now I want to deploy my UI changes through JENKINs. But my build getting failed. its been 4 days I'm trying to resolve the issues but couldn't make it,</p>
  <p>Could someone help me to point out what the exact issue am facing and what needs to be done in order to resolve the build issue.</p>
  <p>package.json</p>
  <pre><code>{
    &quot;name&quot;: &quot;@xxx-some-theme/this-is-my-angular-app-ui&quot;,
    &quot;version&quot;: &quot;4.1.0&quot;,
    &quot;description&quot;: &quot;Angular Frontend UI for Fraud Center APP TCC Limits&quot;,
    &quot;scripts&quot;: {
      &quot;ng&quot;: &quot;ng&quot;,
      &quot;build&quot;: &quot;ng build&quot;,
      &quot;build:watch&quot;: &quot;ng build --watch&quot;,
      &quot;test:ci&quot;: &quot;ng test --browsers=ChromeHeadless --watch=false&quot;,
      &quot;lint&quot;: &quot;eslint --ext .js,.ts src&quot;,
      &quot;jenkins&quot;: &quot;run-s lint test:jenkins build:jenkins&quot;,
      &quot;prebuild&quot;: &quot;npm run lint&quot;,
      &quot;pretest&quot;: &quot;npm run lint&quot;,
      &quot;build:jenkins&quot;: &quot;ng build --prod --aot --build-optimizer --optimization --progress false&quot;,
      &quot;test:jenkins&quot;: &quot;ng test --code-coverage --watch false --progress false&quot;,
      &quot;postbuild&quot;: &quot;save-build-version&quot;,
      &quot;postjenkins&quot;: &quot;save-build-version&quot;
    },
    &quot;files&quot;: [
      &quot;/dist&quot;,
      &quot;nginx.conf&quot;,
      &quot;mime.types&quot;
    ],
    &quot;dependencies&quot;: {
      &quot;@angular/animations&quot;: &quot;13.3.11&quot;,
      &quot;@angular/cdk&quot;: &quot;7.3.5&quot;,
      &quot;@angular/common&quot;: &quot;13.3.11&quot;,
      &quot;@angular/compiler&quot;: &quot;13.3.11&quot;,
      &quot;@angular/core&quot;: &quot;13.3.11&quot;,
      &quot;@angular/forms&quot;: &quot;13.3.11&quot;,
      &quot;@angular/http&quot;: &quot;7.2.15&quot;,
      &quot;@angular/platform-browser&quot;: &quot;13.3.11&quot;,
      &quot;@angular/platform-browser-dynamic&quot;: &quot;13.3.11&quot;,
      &quot;@angular/router&quot;: &quot;13.3.11&quot;,
      &quot;@ngx-translate/core&quot;: &quot;11.0.1&quot;,
      &quot;@ngx-translate/http-loader&quot;: &quot;4.0.0&quot;,
      &quot;cerialize&quot;: &quot;0.1.18&quot;,
      &quot;chart.js&quot;: &quot;3.8.0&quot;,
      &quot;core-js&quot;: &quot;2.5.3&quot;,
      &quot;font-awesome&quot;: &quot;4.7.0&quot;,
      &quot;lodash&quot;: &quot;4.17.5&quot;,
      &quot;moment&quot;: &quot;2.24.0&quot;,
      &quot;moment-timezone&quot;: &quot;0.5.23&quot;,
      &quot;ngx-bootstrap&quot;: &quot;5.5.0&quot;,
      &quot;ngx-cookie&quot;: &quot;2.0.1&quot;,
      &quot;ngx-toastr&quot;: &quot;8.2.1&quot;,
      &quot;primeicons&quot;: &quot;1.0.0&quot;,
      &quot;primeng&quot;: &quot;9.1.3&quot;,
      &quot;quill&quot;: &quot;1.3.7&quot;,
      &quot;rxjs&quot;: &quot;6.5.2&quot;,
      &quot;rxjs-compat&quot;: &quot;6.6.7&quot;,
      &quot;tslib&quot;: &quot;^2.4.0&quot;,
      &quot;zone.js&quot;: &quot;~0.11.5&quot;
    },
    &quot;devDependencies&quot;: {
      &quot;@angular-devkit/build-angular&quot;: &quot;13.3.8&quot;,
      &quot;@angular-eslint/builder&quot;: &quot;13.5.0&quot;,
      &quot;@angular-eslint/eslint-plugin&quot;: &quot;13.5.0&quot;,
      &quot;@angular-eslint/eslint-plugin-template&quot;: &quot;13.5.0&quot;,
      &quot;@angular-eslint/schematics&quot;: &quot;13.5.0&quot;,
      &quot;@angular-eslint/template-parser&quot;: &quot;13.5.0&quot;,
      &quot;@angular/cli&quot;: &quot;13.3.8&quot;,
      &quot;@angular/compiler-cli&quot;: &quot;13.3.11&quot;,
      &quot;@angular/language-service&quot;: &quot;13.3.11&quot;,
      &quot;@types/jasmine&quot;: &quot;3.3.12&quot;,
      &quot;@types/jasminewd2&quot;: &quot;2.0.6&quot;,
      &quot;@types/lodash&quot;: &quot;4.14.123&quot;,
      &quot;@types/moment-timezone&quot;: &quot;0.5.12&quot;,
      &quot;@types/node&quot;: &quot;11.11.6&quot;,
      &quot;@typescript-eslint/eslint-plugin&quot;: &quot;5.27.1&quot;,
      &quot;@typescript-eslint/parser&quot;: &quot;5.27.1&quot;,
      &quot;codelyzer&quot;: &quot;4.5.0&quot;,
      &quot;eslint&quot;: &quot;^8.17.0&quot;,
      &quot;jasmine-core&quot;: &quot;3.3.0&quot;,
      &quot;jasmine-spec-reporter&quot;: &quot;4.2.1&quot;,
      &quot;karma&quot;: &quot;6.4.0&quot;,
      &quot;karma-chrome-launcher&quot;: &quot;2.2.0&quot;,
      &quot;karma-coverage&quot;: &quot;2.2.0&quot;,
      &quot;karma-coverage-istanbul-reporter&quot;: &quot;2.0.5&quot;,
      &quot;karma-jasmine&quot;: &quot;2.0.1&quot;,
      &quot;karma-jasmine-html-reporter&quot;: &quot;1.4.0&quot;,
      &quot;karma-phantomjs-launcher&quot;: &quot;1.0.4&quot;,
      &quot;lodash-es&quot;: &quot;4.17.21&quot;,
      &quot;npm-run-all&quot;: &quot;4.1.5&quot;,
      &quot;sass&quot;: &quot;1.22.9&quot;,
      &quot;sonar-scanner&quot;: &quot;3.1.0&quot;,
      &quot;ts-node&quot;: &quot;8.0.3&quot;,
      &quot;tsconfig-paths&quot;: &quot;4.0.0&quot;,
      &quot;tslib&quot;: &quot;2.4.0&quot;,
      &quot;tslint&quot;: &quot;6.1.3&quot;,
      &quot;tslint-sonarts&quot;: &quot;1.9.0&quot;,
      &quot;typescript&quot;: &quot;4.6.4&quot;
    }
  }
  </code></pre>
  <p>karma.config.js</p>
  <pre><code>module.exports = function (config) {
    config.set({
      basePath: '',
      frameworks: ['jasmine', '@angular-devkit/build-angular'],
      plugins: [
        require('karma-jasmine'),
        require('karma-phantomjs-launcher'),
        require('karma-jasmine-html-reporter'),
        require('karma-coverage-istanbul-reporter'),
        require('@angular-devkit/build-angular/plugins/karma')
      ],
      client:{
        clearContext: false, // leave Jasmine Spec Runner output visible in browser
      },
      coverageIstanbulReporter: {
        dir: require('path').join(__dirname, '../coverage/ngx-this-is-my-app'),
        reports: ['html', 'lcovonly', 'text-summary'],
        fixWebpackSourcePaths: true,
        thresholds: {
          global: {
            statements: 80,
            lines: 80,
            branches: 80,
            functions: 80,
          },
        }
      },
      reporters: ['progress', 'kjhtml'],
      port: 9876,
      colors: true,
      logLevel: config.LOG_INFO,
      autoWatch: true,
      browsers: ['PhantomJS', 'ChromeHeadless'],
      singleRun: false,
      restartOnFileChange: true,
      customLaunchers: {
        ChromeHeadless: {
          base: &quot;Chrome&quot;,
          flags: [
            &quot;--headless&quot;,
            &quot;--disable-gpu&quot;,
            &quot;--no-sandbox&quot;,
            &quot;--remote-debugging-port=9222&quot;
          ],
        }
      },
    });
  };
  </code></pre>
  <p><strong>part 1 Error</strong></p>
  <pre><code>Key: srcDir Value: null
  [Pipeline] echo
  Key: nodeVersion Value: 14
  [Pipeline] echo
  Key: npmCommand Value: npm run jenkins
  [Pipeline] echo
  Key: preScript Value: [npm ci]
  [Pipeline] echo
  Key: postScript Value: null
  [Pipeline] echo
  Key: phantomjs Value: true
  [Pipeline] deleteDir
  [Pipeline] unstash
  [Pipeline] echo
  NODE PATH: /SOME-LOCATION/javascript/node-v14.17.3-linux-x64
  [Pipeline] tool
  [Pipeline] sh
  + curl -f -o phantomjs-2.1.1.zip https://artifacts.TEST-COMPANY.int/artifactory/maven-external-release/phantomjs/phantomjs/2.1.1/phantomjs-2.1.1.zip
    % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                   Dload  Upload   Total   Spent    Left  Speed
  
    0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
   43 24.9M   43 10.8M    0     0  9277k      0  0:00:02  0:00:01  0:00:01 9277k
  100 24.9M  100 24.9M    0     0  17.6M      0  0:00:01  0:00:01 --:--:-- 17.6M
  [Pipeline] sh
  + unzip -o phantomjs-2.1.1.zip
  Archive:  phantomjs-2.1.1.zip
    inflating: phantomjs-static        
  [Pipeline] sh
  + mkdir -p bin
  [Pipeline] sh
  + mv phantomjs-static bin/phantomjs
  [Pipeline] withEnv
  [Pipeline] {
  [Pipeline] sh
  + npm ci
  
  &gt; nice-napi@1.0.2 install /SOME-LOCATION/jenkins/workspace/we-dont-need-this/PLEASE/IGNORE/THIS/node_modules/nice-napi
  &gt; node-gyp-build
  
  gyp WARN install got an error, rolling back install
  gyp ERR! configure error 
  gyp ERR! stack Error: connect ETIMEDOUT dummy-ip-address:443
  gyp ERR! stack     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1148:16)
  gyp ERR! System Linux 3.10.0-1160.59.1.el7.x86_64
  gyp ERR! command &quot;/SOME-LOCATION/javascript/node-v14.17.3-linux-x64/bin/node&quot; &quot;/SOME-LOCATION/javascript/node-v14.17.3-linux-x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js&quot; &quot;rebuild&quot;
  gyp ERR! cwd /SOME-LOCATION/jenkins/workspace/we-dont-need-this/PLEASE/IGNORE/THIS/node_modules/nice-napi
  gyp ERR! node -v v14.17.3
  gyp ERR! node-gyp -v v5.1.0
  gyp ERR! not ok 
  </code></pre>
  <p><strong>part 2 Error</strong></p>
  <pre><code>- primeng/spinner [es2015/esm2015] (https://github.com/primefaces/primeng)
  - primeng/splitbutton [es2015/esm2015] (https://github.com/primefaces/primeng)
  - primeng/steps [es2015/esm2015] (https://github.com/primefaces/primeng)
  - primeng/table [es2015/esm2015] (https://github.com/primefaces/primeng)
  - primeng/tabmenu [es2015/esm2015] (https://github.com/primefaces/primeng)
  - primeng/tabview [es2015/esm2015] (https://github.com/primefaces/primeng)
  - primeng/terminal [es2015/esm2015] (https://github.com/primefaces/primeng)
  - primeng/tieredmenu [es2015/esm2015] (https://github.com/primefaces/primeng)
  - primeng/toast [es2015/esm2015] (https://github.com/primefaces/primeng)
  - primeng/togglebutton [es2015/esm2015] (https://github.com/primefaces/primeng)
  - primeng/toolbar [es2015/esm2015] (https://github.com/primefaces/primeng)
  - primeng/treetable [es2015/esm2015] (https://github.com/primefaces/primeng)
  - primeng/tree [es2015/esm2015] (https://github.com/primefaces/primeng)
  - primeng/tristatecheckbox [es2015/esm2015] (https://github.com/primefaces/primeng)
  - primeng/virtualscroller [es2015/esm2015] (https://github.com/primefaces/primeng)
  - @another-custom/lib-common [es2015/esm2015] (git+https://globalrepository.company-local.int/stash/scm/app-name/ngx-demo.git)
  - @another-custom-2/lib-common [es2015/esm2015] (git+https://globalrepository.company-local.int/stash/scm/app-name/ngx-demo-utils.git)
  - @another-custom-3/lmodel-data [es2015/esm2015] (git+https://globalrepository.company-local.int/stash/scm/app-name/cc-demo-data-model.git)
  - primeng [es2015/esm2015] (https://github.com/primefaces/primeng)
  Encourage the library authors to publish an Ivy distribution.
  09 08 2022 01:13:36.349:INFO [karma-server]: Karma v6.4.0 server started at http://localhost:9876/
  09 08 2022 01:13:36.352:INFO [launcher]: Launching browsers Chrome with concurrency unlimited
  09 08 2022 01:13:36.357:INFO [launcher]: Starting browser Chrome
  09 08 2022 01:13:36.358:ERROR [launcher]: No binary for Chrome browser on your platform.
    Please, set &quot;CHROME_BIN&quot; env variable.
  npm ERR! code ELIFECYCLE
  npm ERR! errno 1
  npm ERR! CUSTOM/LIBRARY/WE/CAN/IGNORE/THIS-ui@4.1.0 test:jenkins: `ng test --code-coverage --watch false --progress false`
  npm ERR! Exit status 1
  npm ERR! 
  npm ERR! Failed at the CUSTOM/LIBRARY/WE/CAN/IGNORE/THIS-ui@4.1.0 test:jenkins script.
  npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
  
  npm ERR! A complete log of this run can be found in:
  npm ERR!     SOME-LOCATION/jenkins/workspace/WE/CAN/IGNORE/THIS/nodejs_data/.npm/_logs/2022-08-09T06_13_36_812Z-debug.log
  ERROR: &quot;test:jenkins&quot; exited with 1.
  npm ERR! code ELIFECYCLE
  npm ERR! errno 1
  npm ERR! CUSTOM/LIBRARY/WE/CAN/IGNORE/THIS-ui@4.1.0 jenkins: `run-s lint test:jenkins build:jenkins`
  npm ERR! Exit status 1
  npm ERR! 
  npm ERR! Failed at the CUSTOM/LIBRARY/WE/CAN/IGNORE/THIS-ui@4.1.0 jenkins script.
  npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
  
  npm ERR! A complete log of this run can be found in:
  npm ERR!     SOME-LOCATION/jenkins/workspace/WE/CAN/IGNORE/THIS/nodejs_data/.npm/_logs/2022-08-09T06_13_36_957Z-debug.log
  [Pipeline] }
  [Pipeline] // withEnv
  [Pipeline] echo
  Error during processing of stage BuildNodeApplication caused by script returned exit code 1
  [Pipeline] }
  [Pipeline] // node
  [Pipeline] }
  [Pipeline] // stage
  [Pipeline] echo
  hudson.AbortException: script returned exit code 1
  </code></pre>
  <p>What am I doing wrong? What needs to be done here?</p>
  
Tags: <jenkins><jenkins-pipeline>
Title: How to understand and resolve Jenkin job failure - Angular 13 app?
UserDisplayName: Flavio
ThreadText: # How to understand and resolve Jenkin job failure - Angular 13 app?
  
  (Asked by: username_0 on 2022-08-09)
  
  I'm new to Jenkins environment.
  
  I was asked to upgrade **Angular 7.x** app which was built 3 to 5 yrs back into **Angular 13**. Upgrading the Angular app is done. now I want to deploy my UI changes through JENKINs. But my build getting failed. its been 4 days I'm trying to resolve the issues but couldn't make it,
  
  Could someone help me to point out what the exact issue am facing and what needs to be done in order to resolve the build issue.
  
  package.json
  
  ```
  {
    "name": "@xxx-some-theme/this-is-my-angular-app-ui",
    "version": "4.1.0",
    "description": "Angular Frontend UI for Fraud Center APP TCC Limits",
    "scripts": {
      "ng": "ng",
      "build": "ng build",
      "build:watch": "ng build --watch",
      "test:ci": "ng test --browsers=ChromeHeadless --watch=false",
      "lint": "eslint --ext .js,.ts src",
      "jenkins": "run-s lint test:jenkins build:jenkins",
      "prebuild": "npm run lint",
      "pretest": "npm run lint",
      "build:jenkins": "ng build --prod --aot --build-optimizer --optimization --progress false",
      "test:jenkins": "ng test --code-coverage --watch false --progress false",
      "postbuild": "save-build-version",
      "postjenkins": "save-build-version"
    },
    "files": [
      "/dist",
      "nginx.conf",
      "mime.types"
    ],
    "dependencies": {
      "@angular/animations": "13.3.11",
      "@angular/cdk": "7.3.5",
      "@angular/common": "13.3.11",
      "@angular/compiler": "13.3.11",
      "@angular/core": "13.3.11",
      "@angular/forms": "13.3.11",
      "@angular/http": "7.2.15",
      "@angular/platform-browser": "13.3.11",
      "@angular/platform-browser-dynamic": "13.3.11",
      "@angular/router": "13.3.11",
      "@ngx-translate/core": "11.0.1",
      "@ngx-translate/http-loader": "4.0.0",
      "cerialize": "0.1.18",
      "chart.js": "3.8.0",
      "core-js": "2.5.3",
      "font-awesome": "4.7.0",
      "lodash": "4.17.5",
      "moment": "2.24.0",
      "moment-timezone": "0.5.23",
      "ngx-bootstrap": "5.5.0",
      "ngx-cookie": "2.0.1",
      "ngx-toastr": "8.2.1",
      "primeicons": "1.0.0",
      "primeng": "9.1.3",
      "quill": "1.3.7",
      "rxjs": "6.5.2",
      "rxjs-compat": "6.6.7",
      "tslib": "^2.4.0",
      "zone.js": "~0.11.5"
    },
    "devDependencies": {
      "@angular-devkit/build-angular": "13.3.8",
      "@angular-eslint/builder": "13.5.0",
      "@angular-eslint/eslint-plugin": "13.5.0",
      "@angular-eslint/eslint-plugin-template": "13.5.0",
      "@angular-eslint/schematics": "13.5.0",
      "@angular-eslint/template-parser": "13.5.0",
      "@angular/cli": "13.3.8",
      "@angular/compiler-cli": "13.3.11",
      "@angular/language-service": "13.3.11",
      "@types/jasmine": "3.3.12",
      "@types/jasminewd2": "2.0.6",
      "@types/lodash": "4.14.123",
      "@types/moment-timezone": "0.5.12",
      "@types/node": "11.11.6",
      "@typescript-eslint/eslint-plugin": "5.27.1",
      "@typescript-eslint/parser": "5.27.1",
      "codelyzer": "4.5.0",
      "eslint": "^8.17.0",
      "jasmine-core": "3.3.0",
      "jasmine-spec-reporter": "4.2.1",
      "karma": "6.4.0",
      "karma-chrome-launcher": "2.2.0",
      "karma-coverage": "2.2.0",
      "karma-coverage-istanbul-reporter": "2.0.5",
      "karma-jasmine": "2.0.1",
      "karma-jasmine-html-reporter": "1.4.0",
      "karma-phantomjs-launcher": "1.0.4",
      "lodash-es": "4.17.21",
      "npm-run-all": "4.1.5",
      "sass": "1.22.9",
      "sonar-scanner": "3.1.0",
      "ts-node": "8.0.3",
      "tsconfig-paths": "4.0.0",
      "tslib": "2.4.0",
      "tslint": "6.1.3",
      "tslint-sonarts": "1.9.0",
      "typescript": "4.6.4"
    }
  }
  
  ```
  
  karma.config.js
  
  ```
  module.exports = function (config) {
    config.set({
      basePath: '',
      frameworks: ['jasmine', '@angular-devkit/build-angular'],
      plugins: [
        require('karma-jasmine'),
        require('karma-phantomjs-launcher'),
        require('karma-jasmine-html-reporter'),
        require('karma-coverage-istanbul-reporter'),
        require('@angular-devkit/build-angular/plugins/karma')
      ],
      client:{
        clearContext: false, // leave Jasmine Spec Runner output visible in browser
      },
      coverageIstanbulReporter: {
        dir: require('path').join(__dirname, '../coverage/ngx-this-is-my-app'),
        reports: ['html', 'lcovonly', 'text-summary'],
        fixWebpackSourcePaths: true,
        thresholds: {
          global: {
            statements: 80,
            lines: 80,
            branches: 80,
            functions: 80,
          },
        }
      },
      reporters: ['progress', 'kjhtml'],
      port: 9876,
      colors: true,
      logLevel: config.LOG_INFO,
      autoWatch: true,
      browsers: ['PhantomJS', 'ChromeHeadless'],
      singleRun: false,
      restartOnFileChange: true,
      customLaunchers: {
        ChromeHeadless: {
          base: "Chrome",
          flags: [
            "--headless",
            "--disable-gpu",
            "--no-sandbox",
            "--remote-debugging-port=9222"
          ],
        }
      },
    });
  };
  
  ```
  
  **part 1 Error**
  
  ```
  Key: srcDir Value: null
  [Pipeline] echo
  Key: nodeVersion Value: 14
  [Pipeline] echo
  Key: npmCommand Value: npm run jenkins
  [Pipeline] echo
  Key: preScript Value: [npm ci]
  [Pipeline] echo
  Key: postScript Value: null
  [Pipeline] echo
  Key: phantomjs Value: true
  [Pipeline] deleteDir
  [Pipeline] unstash
  [Pipeline] echo
  NODE PATH: /SOME-LOCATION/javascript/node-v14.17.3-linux-x64
  [Pipeline] tool
  [Pipeline] sh
  + curl -f -o phantomjs-2.1.1.zip https://artifacts.TEST-COMPANY.int/artifactory/maven-external-release/phantomjs/phantomjs/2.1.1/phantomjs-2.1.1.zip
    % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                   Dload  Upload   Total   Spent    Left  Speed
  
    0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
   43 24.9M   43 10.8M    0     0  9277k      0  0:00:02  0:00:01  0:00:01 9277k
  100 24.9M  100 24.9M    0     0  17.6M      0  0:00:01  0:00:01 --:--:-- 17.6M
  [Pipeline] sh
  + unzip -o phantomjs-2.1.1.zip
  Archive:  phantomjs-2.1.1.zip
    inflating: phantomjs-static        
  [Pipeline] sh
  + mkdir -p bin
  [Pipeline] sh
  + mv phantomjs-static bin/phantomjs
  [Pipeline] withEnv
  [Pipeline] {
  [Pipeline] sh
  + npm ci
  
  > nice-napi@1.0.2 install /SOME-LOCATION/jenkins/workspace/we-dont-need-this/PLEASE/IGNORE/THIS/node_modules/nice-napi
  > node-gyp-build
  
  gyp WARN install got an error, rolling back install
  gyp ERR! configure error 
  gyp ERR! stack Error: connect ETIMEDOUT dummy-ip-address:443
  gyp ERR! stack     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1148:16)
  gyp ERR! System Linux 3.10.0-1160.59.1.el7.x86_64
  gyp ERR! command "/SOME-LOCATION/javascript/node-v14.17.3-linux-x64/bin/node" "/SOME-LOCATION/javascript/node-v14.17.3-linux-x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
  gyp ERR! cwd /SOME-LOCATION/jenkins/workspace/we-dont-need-this/PLEASE/IGNORE/THIS/node_modules/nice-napi
  gyp ERR! node -v v14.17.3
  gyp ERR! node-gyp -v v5.1.0
  gyp ERR! not ok 
  
  ```
  
  **part 2 Error**
  
  ```
  - primeng/spinner [es2015/esm2015] (https://github.com/primefaces/primeng)
  - primeng/splitbutton [es2015/esm2015] (https://github.com/primefaces/primeng)
  - primeng/steps [es2015/esm2015] (https://github.com/primefaces/primeng)
  - primeng/table [es2015/esm2015] (https://github.com/primefaces/primeng)
  - primeng/tabmenu [es2015/esm2015] (https://github.com/primefaces/primeng)
  - primeng/tabview [es2015/esm2015] (https://github.com/primefaces/primeng)
  - primeng/terminal [es2015/esm2015] (https://github.com/primefaces/primeng)
  - primeng/tieredmenu [es2015/esm2015] (https://github.com/primefaces/primeng)
  - primeng/toast [es2015/esm2015] (https://github.com/primefaces/primeng)
  - primeng/togglebutton [es2015/esm2015] (https://github.com/primefaces/primeng)
  - primeng/toolbar [es2015/esm2015] (https://github.com/primefaces/primeng)
  - primeng/treetable [es2015/esm2015] (https://github.com/primefaces/primeng)
  - primeng/tree [es2015/esm2015] (https://github.com/primefaces/primeng)
  - primeng/tristatecheckbox [es2015/esm2015] (https://github.com/primefaces/primeng)
  - primeng/virtualscroller [es2015/esm2015] (https://github.com/primefaces/primeng)
  - @another-custom/lib-common [es2015/esm2015] (git+https://globalrepository.company-local.int/stash/scm/app-name/ngx-demo.git)
  - @another-custom-2/lib-common [es2015/esm2015] (git+https://globalrepository.company-local.int/stash/scm/app-name/ngx-demo-utils.git)
  - @another-custom-3/lmodel-data [es2015/esm2015] (git+https://globalrepository.company-local.int/stash/scm/app-name/cc-demo-data-model.git)
  - primeng [es2015/esm2015] (https://github.com/primefaces/primeng)
  Encourage the library authors to publish an Ivy distribution.
  09 08 2022 01:13:36.349:INFO [karma-server]: Karma v6.4.0 server started at http://localhost:9876/
  09 08 2022 01:13:36.352:INFO [launcher]: Launching browsers Chrome with concurrency unlimited
  09 08 2022 01:13:36.357:INFO [launcher]: Starting browser Chrome
  09 08 2022 01:13:36.358:ERROR [launcher]: No binary for Chrome browser on your platform.
    Please, set "CHROME_BIN" env variable.
  npm ERR! code ELIFECYCLE
  npm ERR! errno 1
  npm ERR! CUSTOM/LIBRARY/WE/CAN/IGNORE/THIS-ui@4.1.0 test:jenkins: `ng test --code-coverage --watch false --progress false`
  npm ERR! Exit status 1
  npm ERR! 
  npm ERR! Failed at the CUSTOM/LIBRARY/WE/CAN/IGNORE/THIS-ui@4.1.0 test:jenkins script.
  npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
  
  npm ERR! A complete log of this run can be found in:
  npm ERR!     SOME-LOCATION/jenkins/workspace/WE/CAN/IGNORE/THIS/nodejs_data/.npm/_logs/2022-08-09T06_13_36_812Z-debug.log
  ERROR: "test:jenkins" exited with 1.
  npm ERR! code ELIFECYCLE
  npm ERR! errno 1
  npm ERR! CUSTOM/LIBRARY/WE/CAN/IGNORE/THIS-ui@4.1.0 jenkins: `run-s lint test:jenkins build:jenkins`
  npm ERR! Exit status 1
  npm ERR! 
  npm ERR! Failed at the CUSTOM/LIBRARY/WE/CAN/IGNORE/THIS-ui@4.1.0 jenkins script.
  npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
  
  npm ERR! A complete log of this run can be found in:
  npm ERR!     SOME-LOCATION/jenkins/workspace/WE/CAN/IGNORE/THIS/nodejs_data/.npm/_logs/2022-08-09T06_13_36_957Z-debug.log
  [Pipeline] }
  [Pipeline] // withEnv
  [Pipeline] echo
  Error during processing of stage BuildNodeApplication caused by script returned exit code 1
  [Pipeline] }
  [Pipeline] // node
  [Pipeline] }
  [Pipeline] // stage
  [Pipeline] echo
  hudson.AbortException: script returned exit code 1
  
  ```
  
  What am I doing wrong? What needs to be done here?
  
  **Tags:** jenkins, jenkins-pipeline
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2022-08-09. Score: 0
  
  Part one is a failure to install [node-gyp](https://github.com/nodejs/node-gyp). The error is a connection timeout to some ipaddress:
  
  ```
  stack Error: connect ETIMEDOUT dummy-ip-address:443 
  
  ```
  
  The second error is because chrome is not installed on the Jenkins Agents where you are running the build.
  
  ```
  09 08 2022 01:13:36.358:ERROR [launcher]: No binary for Chrome browser on your platform.
    Please, set "CHROME_BIN" env variable.
  npm ERR! code ELIFECYCLE
  npm ERR! errno 1
  npm ERR! CUSTOM/LIBRARY/WE/CAN/IGNORE/THIS-ui@4.1.0 test:jenkins: `ng test --code-coverage --watch false --progress false`
  npm ERR! Exit status 1
  
  ```
  
  Neither of these are really "Jenkins" issues.
  
  
  ---
  
  