For angular users

Please include the following NPM packages:

process, buffer

And add the following code into polyfills.ts

import * as process from 'process';
window['process'] = process;
(window as any).global = window;
(window as any).global.Buffer = (window as any).global.Buffer || require('buffer').Buffer;