Whats up!
I bumped into an issue. I imported the library into the challenge, however I find yourself getting an error once I begin the challenge:
Error: Present setting doesn't present a require() for requiring 'crypto'.
I’ve tried many options discovered within the documentation and on third-party websites. However nothing labored. How can I remedy this drawback?
As I perceive third occasion packages which I import have require() operate which isn’t supported by present setting. However I can’t determine the right way to repair it.
You’ll be able to confer with this doc to make use of crypto:
Thanks for the reply, however this resolution didn’t assist.
I’ll attempt to let you know extra in regards to the error.
I’m attempting to import @solana/web3.js into the challenge.
Import * as solanaWeb3 from "@solana/web3.js";
However as quickly as I attempt to use the instance from the documentation:
console.log(solanaWeb3);
An error happens (it’s seen with the developer instruments within the browser):
Error: Present setting doesn't present a require() for requiring 'crypto'.
manufacturing unit cjs-loader.mjs:93
_load cjs-loader.mjs:78
_tryModuleLoad cjs-loader.mjs:63
_require cjs-loader.mjs:42
_createRequire cjs-loader.mjs:105
_createRequireWithResolveMap cjs-loader.mjs:112
execute crypto.js:14
_load cjs-loader.mjs:78
_tryModuleLoad cjs-loader.mjs:63
_require cjs-loader.mjs:42
_createRequire cjs-loader.mjs:105
_createRequireWithResolveMap cjs-loader.mjs:112
execute utils.js:33
_load cjs-loader.mjs:78
_tryModuleLoad cjs-loader.mjs:63
_require cjs-loader.mjs:42
_createRequire cjs-loader.mjs:105
_createRequireWithResolveMap cjs-loader.mjs:112
execute _sha2.js:16
_load cjs-loader.mjs:78
_tryModuleLoad cjs-loader.mjs:63
_require cjs-loader.mjs:42
_createRequire cjs-loader.mjs:105
_createRequireWithResolveMap cjs-loader.mjs:112
execute sha512.js:19
_load cjs-loader.mjs:78
_tryModuleLoad cjs-loader.mjs:63
_require cjs-loader.mjs:42
_createRequire cjs-loader.mjs:105
_createRequireWithResolveMap cjs-loader.mjs:112
execute index.cjs.js:107
_load cjs-loader.mjs:78
_tryModuleLoad cjs-loader.mjs:63
_require cjs-loader.mjs:42
require cjs-loader.mjs:27
execute index.cjs.mjs:7
doExec system.js:482
postOrderExec system.js:472
postOrderExec system.js:461
postOrderExec system.js:459
postOrderExec system.js:461
postOrderExec system.js:459
C system.js:406
If you wish to use web3, please refer right here.