Hello!
I ran into a problem. I imported the library into the project, but I end up getting an error when I start the project:
Error: Current environment does not provide a require() for requiring 'crypto'.
I have tried many solutions found in the documentation and on third-party sites. But nothing worked. How can I solve this problem?
As I understand third party packages which I import have require() function which is not supported by current environment. But I can’t figure out how to fix it.
Thanks for the answer, but this solution did not help.
I will try to tell you more about the error.
I am trying to import @solana/web3.js into the project.
Import * as solanaWeb3 from "@solana/web3.js";
But as soon as I try to use the example from the documentation:
console.log(solanaWeb3);
An error occurs (it’s visible with the developer tools in the browser):