title: Angular 8 - Cannot read property 'NODE_NDEBUG' of undefined when trying serve application
body: <p>The error is at ../node_modules/assert-plus/assert.js from the assert-plus library where it is unable to read the 'NODE_NDEBUG' from 'process.env' as seen in the code snippet below</p>
  
  <pre><code>module.exports = _setExports(process.env.NODE_NDEBUG);
  </code></pre>
  
  <p>I was initially having the error <a href="https://github.com/calvinmetcalf/crypto-pouch/issues/67" rel="nofollow noreferrer">https://github.com/calvinmetcalf/crypto-pouch/issues/67</a> 
  and after following the simple instruction the error went away and then this was the next error message I got.</p>
  
  <pre><code>Uncaught TypeError: Cannot read property 'NODE_NDEBUG' of undefined
      at Object../node_modules/assert-plus/assert.js (assert.js:211)
      at __webpack_require__ (bootstrap:78)
      at Object../node_modules/http-signature/lib/parser.js (parser.js:3)
      at __webpack_require__ (bootstrap:78)
      at Object../node_modules/http-signature/lib/index.js (index.js:3)
      at __webpack_require__ (bootstrap:78)
      at Object../node_modules/request/request.js (request.js:11)
      at __webpack_require__ (bootstrap:78)
      at Object../node_modules/request/index.js (index.js:143)
      at __webpack_require__ (bootstrap:78)
  </code></pre>
  
  <p>Here is a snapshot of my current polyfill.ts file</p>
  
  <pre><code>/***************************************************************************************************
   * APPLICATION IMPORTS
   */
  (window as any) ['global'] = window;
  (window as any).process = window;
  (window as any).process.browser = true;
  (window as any).process.version = '';
  (window as any).process.versions = {node: false};
  declare var global: any;
  global.Buffer = global.Buffer || require('buffer').Buffer;
  </code></pre>
  
  <p>Here is a snapshot of my package.json</p>
  
  <pre><code>{
    "name": "staysharpadmin",
    "version": "0.0.0",
    "scripts": {
      "ng": "ng",
      "start": "ng serve",
      "build": "ng build",
      "test": "ng test",
      "lint": "ng lint",
      "e2e": "ng e2e"
    },
    "private": true,
    "dependencies": {
      "@angular/animations": "~8.0.2",
      "@angular/cdk": "~8.0.2",
      "@angular/common": "~8.0.2",
      "@angular/compiler": "~8.0.2",
      "@angular/core": "~8.0.2",
      "@angular/forms": "~8.0.2",
      "@angular/material": "~8.0.2",
      "@angular/material-moment-adapter": "~8.0.1",
      "@angular/platform-browser": "~8.0.2",
      "@angular/platform-browser-dynamic": "~8.0.2",
      "@angular/router": "~8.0.2",
      "@fortawesome/angular-fontawesome": "^0.5.0",
      "@fortawesome/fontawesome-svg-core": "^1.2.25",
      "@fortawesome/free-solid-svg-icons": "^5.11.2",
      "@ng-bootstrap/ng-bootstrap": "^5.1.1",
      "ajv": "^6.10.2",
      "bluebird": "^3.7.0",
      "bootstrap": "^4.3.1",
      "core-js": "^2.5.4",
      "hammerjs": "^2.0.8",
      "jquery": "^3.4.1",
      "jstimezonedetect": "^1.0.6",
      "lodash": "^4.17.15",
      "moment": "^2.24.0",
      "moment-range": "^4.0.2",
      "moment-timezone": "^0.5.23",
      "popper.js": "^1.15.0",
      "pushy": "^2.0.8",
      "react": "^16.8.6",
      "react-dom": "^16.8.6",
      "request": "^2.88.0",
      "rxjs": "~6.5.2",
      "styled-components": "^4.3.2",
      "tslib": "^1.9.0",
      "twix": "^1.2.1",
      "web-animations-js": "^2.3.2",
      "zone.js": "~0.9.1"
    },
    "devDependencies": {
      "@angular-devkit/build-angular": "^0.800.3",
      "@angular/cli": "8.0.3",
      "@angular/compiler-cli": "~8.0.2",
      "@angular/language-service": "~8.0.2",
      "@types/jasmine": "~2.8.8",
      "@types/jasminewd2": "~2.0.3",
      "@types/node": "^8.9.5",
      "codelyzer": "^5.1.0",
      "jasmine-core": "~2.99.1",
      "jasmine-spec-reporter": "~4.2.1",
      "karma": "^4.1.0",
      "karma-chrome-launcher": "~2.2.0",
      "karma-coverage-istanbul-reporter": "~2.0.1",
      "karma-jasmine": "~1.1.2",
      "karma-jasmine-html-reporter": "^0.2.2",
      "protractor": "~5.4.0",
      "ts-node": "~7.0.0",
      "tslint": "~5.11.0",
      "typescript": "~3.4.0"
    },
    "browser": {
      "crypto": false,
      "http": false,
      "https": false,
      "os": false,
      "net": false,
      "path": false,
      "stream": false,
      "tls": false,
      "zlib": false,
      "fs": false
    }
  }
  
  </code></pre>
  
  <p>As soon I serve the application the browser shows a white blank screen and when I inspect the page I then see the error message as indicated above. Any suggestions will be greatly appreciated.</p>