Angular 6 - process is not defined when trying to serve application : <p>I am getting the following error when I try to serve my angular 6 application using cosmicjs:</p>

<pre><code>Uncaught ReferenceError: process is not defined
    at Object../node_modules/cosmicjs/dist/index.js (index.js:6)
    at __webpack_require__ (bootstrap:81)
    at Object../src/app/app.component.ts (main.js:94)
    at __webpack_require__ (bootstrap:81)
    at Object../src/app/app.module.ts (app.component.ts:9)
    at __webpack_require__ (bootstrap:81)
    at Object../src/main.ts (environment.ts:18)
    at __webpack_require__ (bootstrap:81)
    at Object.0 (main.ts:12)
    at __webpack_require__ (bootstrap:81)
</code></pre>

<p>My latest theory is something to do with the process.env property being undefined.</p>

<p>I'm following this tutorial <a href="https://hackernoon.com/how-to-build-an-angular-js-image-feed-ea6193fa0b75" rel="noreferrer">here</a></p>

<p>and my exact code can be found <a href="https://github.com/DanielOram/gallery-app" rel="noreferrer">here</a></p>

<p>The tutorial seems to be using an older version of angular that uses .angular-cli.json instead of the new angular.json and I think this is part of the issue in trying to specify the environment variables.</p>
