dappuniversity / price-bot

397 stars 392 forks source link

web3.eth.Contract is not a constructor #39

Closed bafmin closed 2 years ago

bafmin commented 2 years ago
  1. Fresh Git Clone
  2. Remove package-lock.json
  3. npm install
  4. npm install (to be sure all packages are installed)
  5. create .env with RPC URL on Mainnet
  6. npm run start

This is where I get the error "web3.eth.Contract is not a constructor"

Screen Shot 2022-05-29 at 15 14 57
bafmin commented 2 years ago

I saw a comment about using lower case 'c' for Contract. That seems to have stopped this error, but now there are other issues.

JulianWe commented 11 months ago
"web3": "1.2.9" should resolv the issue 
"dependencies": {
    "@truffle/hdwallet-provider": "^1.7.0",
    "axios": "^0.19.2",
    "console.table": "^0.10.0",
    "dotenv": "^8.2.0",
    "ejs": "^2.5.6",
    "express": "^4.15.2",
    "infura-web3-provider": "0.0.3",
    "lodash": "^4.17.15",
    "moment": "^2.25.3",
    "moment-timezone": "^0.5.28",
    "numeral": "^2.0.6",
    "web3": "1.2.9"
  },