audius-protocol icon indicating copy to clipboard operation
audius-protocol copied to clipboard

Process is not defined

Open yttiiz opened this issue 2 years ago • 2 comments

Hi, i'm using the Audius (client side) sdk for my portfolio. Unfortunately, since the last release, i got this error : Uncaught ReferenceError: process is not defined. In browser, there no process variable attach to window. I suppose this error is coming from the bundler. Hope, it will help.

Thanks for your work guys !!!

yttiiz avatar Jan 04 '24 23:01 yttiiz

Hey @yttiiz! sorry for the delay getting back to you here, holidays and all that.

If your bundler doesn't automatically polyfill node libraries (like when using create-react-app v5) you will need to use the web3 script tag instead of the web3 npm package.

<script src="https://cdn.jsdelivr.net/npm/web3@latest/dist/web3.min.js"></script>

samgutentag avatar Jan 17 '24 21:01 samgutentag

Hello @samgutentag . Thanks for the answer.

Actually, i'm already using the web3 script tag in my index.html. I use only Vanillla JS (and no bundler) for my portfolio. I just follow those steps : Audius sdk with HTML + JS

Capture d’écran du 2024-03-04 18-21-22

Then the error appears in a node_modules file util.js in the util folder. Capture d’écran du 2024-03-04 18-24-11

I found this on the internet : process variable in webpack config And that's why I was talking about the bundler, not mine but the Audius sdk one.

yttiiz avatar Feb 04 '24 11:02 yttiiz