You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After installing the web3 npm package, my project doesn't compile when I simply add the line to import it:
import Web3 from 'web3';
This is the error message(s) I'm seeing:
ERROR in ./node_modules/eth-lib/lib/bytes.js
Module not found: Error: Can't resolve 'crypto' in '/Users/jlynch/Git-Projects/CryptoHydrants-Browser-Frontend/crypto-hydrants-ng/node_modules/eth-lib/lib'
ERROR in ./node_modules/web3-eth-accounts/lib/index.js
Module not found: Error: Can't resolve 'crypto' in '/Users/jlynch/Git-Projects/CryptoHydrants-Browser-Frontend/crypto-hydrants-ng/node_modules/web3-eth-accounts/lib'
ERROR in ./node_modules/web3-eth-accounts/node_modules/eth-lib/lib/bytes.js
Module not found: Error: Can't resolve 'crypto' in '/Users/jlynch/Git-Projects/CryptoHydrants-Browser-Frontend/crypto-hydrants-ng/node_modules/web3-eth-accounts/node_modules/eth-lib/lib'
ERROR in ./node_modules/web3-providers-http/lib/index.js
Module not found: Error: Can't resolve 'http' in '/Users/jlynch/Git-Projects/CryptoHydrants-Browser-Frontend/crypto-hydrants-ng/node_modules/web3-providers-http/lib'
ERROR in ./node_modules/xhr2-cookies/dist/xml-http-request.js
Module not found: Error: Can't resolve 'http' in '/Users/jlynch/Git-Projects/CryptoHydrants-Browser-Frontend/crypto-hydrants-ng/node_modules/xhr2-cookies/dist'
ERROR in ./node_modules/web3-providers-http/lib/index.js
Module not found: Error: Can't resolve 'https' in '/Users/jlynch/Git-Projects/CryptoHydrants-Browser-Frontend/crypto-hydrants-ng/node_modules/web3-providers-http/lib'
ERROR in ./node_modules/xhr2-cookies/dist/xml-http-request.js
Module not found: Error: Can't resolve 'https' in '/Users/jlynch/Git-Projects/CryptoHydrants-Browser-Frontend/crypto-hydrants-ng/node_modules/xhr2-cookies/dist'
ERROR in ./node_modules/xhr2-cookies/dist/xml-http-request.js
Module not found: Error: Can't resolve 'os' in '/Users/jlynch/Git-Projects/CryptoHydrants-Browser-Frontend/crypto-hydrants-ng/node_modules/xhr2-cookies/dist'
ERROR in ./node_modules/cipher-base/index.js
Module not found: Error: Can't resolve 'stream' in '/Users/jlynch/Git-Projects/CryptoHydrants-Browser-Frontend/crypto-hydrants-ng/node_modules/cipher-base'
ERROR in ./node_modules/keccak/lib/api/keccak.js
Module not found: Error: Can't resolve 'stream' in '/Users/jlynch/Git-Projects/CryptoHydrants-Browser-Frontend/crypto-hydrants-ng/node_modules/keccak/lib/api'
ERROR in ./node_modules/keccak/lib/api/shake.js
Module not found: Error: Can't resolve 'stream' in '/Users/jlynch/Git-Projects/CryptoHydrants-Browser-Frontend/crypto-hydrants-ng/node_modules/keccak/lib/api'
Hi, I am working on a recently scaffolded Angular application.
I am trying to run similar code to this project here:
https://github.com/amaurym/login-with-metamask-demo
After installing the
web3
npm package, my project doesn't compile when I simply add the line to import it:This is the error message(s) I'm seeing:
I'm using node
v14.17.0
Here is my package.json:
Can anyone please help me get past this blocker? 🙏
The text was updated successfully, but these errors were encountered: