I'm using truffle develop
to interact with the MetaCoin tutorial contract. I've done this before months ago on an older version of truffle and this worked fine.
But now, I'm getting the same error every time I try to use await. I've tried a completely fresh install of the MetaCoin app following the tutorial and my own contract written from scratch, nothing is working.
truffle(develop)> let accounts = await web3.eth.getAccounts()
Uncaught ReferenceError: global is not defined
at evalmachine.<anonymous>:2:19
truffle(develop)> let x = await MetaCoin.deployed()
Uncaught ReferenceError: global is not defined
at evalmachine.<anonymous>:2:19
truffle(develop)> let newInstance = await MetaCoin.new()
Uncaught ReferenceError: global is not defined
at evalmachine.<anonymous>:2:19
I've tried this on both of the following environments:
Truffle v5.4.5 (core: 5.4.5)
Solidity v0.5.16 (solc-js)
Node v15.5.0
Web3.js v1.5.1
Truffle v5.4.5 (core: 5.4.5)
Solidity v0.5.16 (solc-js)
Node v16.6.1
Web3.js v1.5.1
What could be wrong here?