Truffle Introduction

Good day! How do I get the Atom text editor to automatically change the text color on my solidity code? Thanks!

Update: Installed language-solidity package in atom

1 Like

I was never able to figure this out.
Fortunately, I have a cheap windows 10 Lenovo laptop which I rarely used and kept. I pulled that out for this and it works perfectly.

This is what happens when I run sudo npm install -g truffle. It wont let me type my password for some reason.

Ignore my last post i figured it out haha, thanks Dan-i.

1 Like

Sorry to ask you a million questions. So i changed the compiler version in the truffle-config.js file to 0.5.12, i still get the following error. Should i just change my statement to 0.5.16? or will that affect my ability to continue with the course. The other option is to downgrade truffle to compiler 0.5.12? I went to https://trufflesuite.com/docs/truffle/reference/configuration#compiler-configuration but I dont understand how to implement this.

Hey @RCV

Make sure to change the compiler (to 0.5.12) as explained here: FAQ - How do change truffle version

Once done, close ganache and open it back.
Then run truffle migrate --reset.

The compiler is downloaded as soon as you run truffle so you don’t need to do anything manually except for change the truffle version in truffle-config.

Give it a try and let me know.

Cheers,
Dani

1 Like

Success!! Finally thanks dan-i!!!

1 Like

I’m working with a Mac machine running Big Sur 11 (my first time using a mac for development) and for some reason, even after installing truffle in the local directory, my command prompt returns an error for any truffle commands. It says truffle is not a recognized command. Any idea how to fix this? Thank you!

Weird it works if I use npx truffle init
I’d still like to hear any solutions so I can run truffle commands the usual way, thank you!

Hey @a.lwsn

Try to install truffle globally sudo npm install -g truffle.
Also downgrade node: FAQ - How to downgrade Node.Js

Let me know if that helped.

Cheers,
Dani

That worked thank you very much!

1 Like

Happy to read that! :grin:

I am now in the setter function lecture when I run the migrate --reset command i get an ExtendableError.

I am also reading through the forum some people had a similar issue. They fixed it by upgrading to a newer version of ganache. I am running version 2.1.1.

I tried upgrading ganaches to the newest version i still get the same error. The error happens when Iam in the truffle console and run migrate --reset.

Hello guys,

Some help please :laughing:

Using VSC and all the dependencies that the course uses. Right now I got everything migrate to Ganache, but my Helloworld.sol is getting this error when I truffle migrate

The contract still deploys so I proceeded to unit testing but when I test it I’m that same message. Please help :sweat_smile:

Hi @RCV

Add this in your truffle config in the Network object:

     ganache: {
      host: "127.0.0.1",     // Localhost (default: none)
      port: 7545,            // Standard Ethereum port (default: none)
      network_id: "*",       // Any network (default: none)
     },

Then again truffle migrate --reset

1 Like

Hey @wilsonlee123

Your deployment is failing because your contract is hitting a revert statement.
Check your migration file and your constructor method and you will probably find require() that is failing.
Feel free to post both your migration file and your contract here.

Happy coding,
Dani

Dan-i, you’re the man!!! Much appreciated. Finally finished that lecture it all ran smoothly just at the end it didn’t console log the message is set for some reason on the terminal. So i had to run instance.getMessage() to see the message I set on the editor.

I have a new issue. In the Payable Function lecture, I did it all without issue but once I set {value: 1000000, from: accounts[0]} save the file, then run migrate --reset, i get the following error.

Hello @dani-i ,

Please take a look.

Not sure what you mean by constructor method. I do have require() in there though.