binodnp / erc20-snapshot

Creates a snapshot of any ERC20 token in JSON or CSV format
http://linkedin.com/in/binodnirvan/
106 stars 89 forks source link

web3 dependency error #4

Open mw2000 opened 3 years ago

mw2000 commented 3 years ago

I was trying to use the erc20-snapshot GitHub repository and ran into some issues. I suspect this is due to broken dependencies.

Note: I have a config.json in my directory from where I ran the erc20-snapshot command. The current error I get is this:

Configuration file was not found. Configuration file was not found. web3-shh package will be deprecated in version 1.3.5 and will no longer be supported. web3-bzz package will be deprecated in version 1.3.5 and will no longer be supported. /usr/local/lib/node_modules/erc20-snapshot/node_modules/web3-eth-contract/lib/index.js:51 throw new Error('Please use the "new" keyword to instantiate a web3.eth.Contract() object!'); ^

Error: Please use the "new" keyword to instantiate a web3.eth.Contract() object! at Eth.Contract (/usr/local/lib/node_modules/erc20-snapshot/node_modules/web3-eth-contract/lib/index.js:51:15) at Eth.Contract (/usr/local/lib/node_modules/erc20-snapshot/node_modules/web3-eth/lib/index.js:257:22) at Object.module.exports.getContract (/usr/local/lib/node_modules/erc20-snapshot/contract.js:12:29) at Object. (/usr/local/lib/node_modules/erc20-snapshot/events/blockchain.js:8:41) at Module._compile (internal/modules/cjs/loader.js:956:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:973:10) at Module.load (internal/modules/cjs/loader.js:812:32) at Function.Module._load (internal/modules/cjs/loader.js:724:14) at Module.require (internal/modules/cjs/loader.js:849:19) at require (internal/modules/cjs/helpers.js:74:18) at Object. (/usr/local/lib/node_modules/erc20-snapshot/index.js:6:16) at Module._compile (internal/modules/cjs/loader.js:956:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:973:10) at Module.load (internal/modules/cjs/loader.js:812:32) at Function.Module._load (internal/modules/cjs/loader.js:724:14) at Function.Module.runMain (internal/modules/cjs/loader.js:1025:10)

devmadhavvv commented 3 years ago

use the keyword "new" before "web3.eth.Contract()"

ueueueuuuipq commented 3 years ago

same issue here