title: Getting npm ERR! errno 199 when running Protractor with cucumber framework
body: <p>I am new to JavaScript and Protractor both, I am using Protractor with cucmber js.
  I am getting issue is below code :</p>
  
  <pre><code>Then(/^I verified all pages visible to logged in user$/, () =&gt; {
  
      var expVisibleNavPages = 'Home,Applications,Programs,Reports,Admin Tools,a';
  
      var NavLinks = element.all(by.css('ul.nav.navbar-nav')).get(0).all(by.css('a'));
  
      var len =0;
  
      NavLinks.then(function(result) {
              len = result.length;
              logger.info("TOTAL NAV LINKS ARE ARE:"+len);
          });
  
  
      var actVisibleNavPages = "";
      var iCt = 0;
  
  
      NavLinks.each(function (element) {
  
          element.getText().then(function(text){
  
          actVisibleNavPages += text+",";
          iCt++;
  
              if (len === iCt)
              {
                  logger.info("ACTUAL PAGES:"+actVisibleNavPages);
  
                  logger.info("EXPECTED PAGES:"+expVisibleNavPages);
  
                  return expect(actVisibleNavPages).to.equal(expVisibleNavPages);
              }
  
  
  
          });
  
  
      });
  </code></pre>
  
  <p>I got bellow error: </p>
  
  <blockquote>
    <p>[2017-12-19T23:59:36.696] [INFO] default - TOTAL NAV LINKS ARE ARE:5
    [2017-12-19T23:59:36.818] [INFO] default - ACTUAL PAGES:Home,Applications,Programs,Reports,Admin Tools,
    [2017-12-19T23:59:36.821] [INFO] default - EXPECTED PAGES:Home,Applications,Programs,Reports,Admin Tools,a
    [23:59:36] E/launcher - expected 'Home,Applications,Programs,Reports,Admin Tools,' to equal 'Home,Applications,Programs,Reports,Admin Tools,a'
    [23:59:36] E/launcher - AssertionError: expected 'Home,Applications,Programs,Reports,Admin Tools,' to equal 'Home,Applications,Programs,Reports,Admin Tools,a'
        at C:/HancockSoftwareAutomation/mdmf_automation_bdd/mdmf_e2e_gui_testing/stepDefinitions/navaigation_bar_steps.js:74:49
        at elementArrayFinder_.then (C:\HancockSoftwareAutomation\mdmf_automation_bdd\mdmf_e2e_gui_testing\node_modules\protractor\built\element.js:804:32)
        at ManagedPromise.invokeCallback_ (C:\HancockSoftwareAutomation\mdmf_automation_bdd\mdmf_e2e_gui_testing\node_modules\selenium-webdriver\lib\promise.js:1376:14)
        at TaskQueue.execute_ (C:\HancockSoftwareAutomation\mdmf_automation_bdd\mdmf_e2e_gui_testing\node_modules\selenium-webdriver\lib\promise.js:3084:14)
        at TaskQueue.executeNext_ (C:\HancockSoftwareAutomation\mdmf_automation_bdd\mdmf_e2e_gui_testing\node_modules\selenium-webdriver\lib\promise.js:3067:27)
        at asyncRun (C:\HancockSoftwareAutomation\mdmf_automation_bdd\mdmf_e2e_gui_testing\node_modules\selenium-webdriver\lib\promise.js:2927:27)
        at C:\HancockSoftwareAutomation\mdmf_automation_bdd\mdmf_e2e_gui_testing\node_modules\selenium-webdriver\lib\promise.js:668:7
        <strong>at 
        at process._tickCallback (internal/process/next_tick.js:188:7)
    [23:59:36] E/launcher - Process exited with error code 199
    npm ERR! code ELIFECYCLE
    npm ERR! errno 199</strong></p>
  </blockquote>
  
  <p>Because of npm errno 199, protractor process is getting terminated and is stop executing further scenarios.</p>
  
  <p>Looking for help.</p>