I am getting the following error when I try to serve my angular 6 application using cosmicjs:
Uncaught ReferenceError: process is not defined at Object..
In polyfill.ts, add this line:
polyfill.ts
(window as any).process = { env: { DEBUG: undefined }, };
Reference: https://github.com/algolia/algoliasearch-client-javascript/issues/691
Or npm i -S process, then add this to polyfill.ts:
npm i -S process
import * as process from 'process'; window['process'] = process;