0

I was trying this Beginner tutorial on smart contracts and solidity. I typed truffle compile, truffle migrate and they ran without any error and I got my gas cost used up in Ganache. When I opened truffle console and typed TodoList = await TodoList.deployed() as per the tutorial, I faced this error below:

Uncaught ReferenceError: global is not defined at evalmachine.<anonymous>:2:19

As per the tutorial, my 2_deploy_contracts.js looks like this

const TodoList = artifacts.require("TodoList.sol");

module.exports = function(deployer) {
  deployer.deploy(TodoList);
};

Let me know what am I doing wrong, thanks in advance!

2

1 Answer 1

0

I found that downgrading Truffle to version 5.4.3 fixed this problem

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.