ReferenceError when using js-IPFS


When following the 101 tutorial for starting a node and deploying a file I’m getting an error on my browser (I’m using Angular with webpack), basically all I’m doing is calling the function ipfsLoad on a different module which loads fine.
I can’t submit the code but it’s exactly the same as the one in this tutorial here

When loading this function in the browser i’m getting the error:

The “Hello ipfs” there is a console.log directly above the start of that code just to make sure it’s entering the function without a problem.
Which I can’t seem to be able to solve… I’ve tried updating webpack just to make sure that’s not the problem but I’m getting nowhere, seems like the problem is with node.on…

Any suggestions I can try ? I’ve been on this issue for 2 days now and I can’t seem to solve it, thanks in advance!