Updated from Angular 5 to 9. I got the following error in browser devtools:
Uncaught ReferenceError: global is not defined
I saw the following post addressing the issue:
Upgrading to angular-6.x gives "Uncaught ReferenceError: global is not defined"
So I tried to implement the accepted answer's solution and put the following script in my index.html file <head>
tag:
<script>
var global = global || window;
var Buffer = Buffer || [];
var process = process || {
env: { DEBUG: undefined },
version: []
};
</script>
However, this gave the following error in browser devtools:
default-encoding.js:6 Uncaught TypeError: process.version.split is not a function
It seems like Angular didn't ship a implementation of process and Buffer to the frontend. Any suggestions how to fix this?