Truffle Introduction

Hello Filip

I am having trouble installing V2.1.1 of Ganache. I already had Ganache installed so added another one instead of deleting. Did not work so I deleted the new version and still no luck.

I am using a Mac M1. This is what I get:

Error: Hardfork muirGlacier not set as supported in supportedHardforks
at Common.setHardfork (/node_modules/ganache-core/node_modules/ethereumjs-common/src/index.ts:112:13)
at new Common (/node_modules/ganache-core/node_modules/ethereumjs-common/src/index.ts:79:12)
at new VM (/node_modules/ganache-core/node_modules/ethereumjs-vm/dist/index.js:62:21)
at BlockchainDouble.createVMFromStateTrie (/node_modules/ganache-core/lib/blockchain_double.js:130:14)
at /node_modules/ganache-core/lib/blockchain_double.js:85:36
at /node_modules/ganache-core/lib/blockchain_double.js:191:5
at /node_modules/ganache-core/lib/database/leveluparrayadapter.js:129:14
at /node_modules/ganache-core/lib/database/leveluparrayadapter.js:24:16
at /node_modules/ganache-core/node_modules/level-sublevel/shell.js:101:15
at /node_modules/ganache-core/node_modules/level-sublevel/nut.js:121:19
at /node_modules/ganache-core/node_modules/encoding-down/index.js:51:21
at /node_modules/ganache-core/node_modules/cachedown/index.js:58:21
at ReadFileContext.callback (/node_modules/ganache-core/lib/database/filedown.js:26:14)
at FSReqWrap.readFileAfterOpen [as oncomplete] (fs.js:420:13)

Any suggestions appreciated.

I am having same issue. Works fine with latest version of Ganache. However this lesson calls for the older version… I am using an M1 Mac which may or may not be related

1 Like

Hello Filip

I mad the changes to the truffle-config.js but still get an error as shown below:

Compiling your contracts…

Compiling ./contracts/HolaMundo.sol
Compiling ./contracts/Migrations.sol

Error: CompileError: /Users/bornfree/Documents/WEB DEV/advanced_ethereum_course/HolaoMundo/contracts/HolaMundo.sol:1:1: ParserError: Source file requires different compiler version (current compiler is 0.5.12+commit.7709ece9.Emscripten.clang - note that nightly builds are considered to be strictly less than the released version
pragma solidity 0.5.12
^ (Relevant source part starts here and spans across multiple lines).

Error: Truffle is currently using solc 0.5.12, but one or more of your contracts specify "pragma solidity 0.5.12
^ (Relevant source part starts here and spans across multiple lines).
Please update your truffle config or pragma statement(s).
(See for information on
configuring Truffle to use a specific solc compiler version.)

Compilation failed. See above.
at Object.compile (/usr/local/lib/node_modules/truffle/build/webpack:/packages/workflow-compile/legacy/index.js:72:1)
Truffle v5.0.42 (core: 5.0.42)
Node v15.4.0


1 Like

You forgot to post your migration

Hi @AaronRene

Make sure that truffle is using the same Solidity version specified in your pragma statements.
Check this out and let me know: FAQ - How do change truffle version

1 Like

I haven’t been able to compile the contract in my terminal. It keeps saying that it can’t find my “Helloworld” file.

You haven’t code the migration for your contract that’s why is not migrating it.
Check this video out :slight_smile:

I haven’t gotten to that point yet. I’m still on the “Hello World” video. I haven’t compiled the contract yet so I can’t deploy it. That’s why I haven’t built the migration file.

I got these error messages when I’m trying to download truffle, what I should do?

Hey @Ville

Other students had the same, issue.
Check this topic and follow the instructions: Setting up your environment


Hi @Deitrich_Brown

You are trying to deploy a new contract using Truffle, therefore you need to write a migration file.
Follow the video I send you last time and keep us posted.


I tried to deploy the contract and this came up. I try compiling the contract and it says that it can’t find my contract.

When I run truffle init, it says command not found. I installed everything correctly heres screen shots.

Hey @RCV

Try to npm install -g truffle, if you get an error sudo npm install -g truffle.
Also downgrade node: FAQ - How to downgrade Node.Js

Let me know if that helps.


1 Like

i down graded node js, when i enter the command -v. I get the following

1 Like

Hey @RCV

You use -v when you want to know the version of a program installed.
You need to state the program you want to know the version of :slight_smile:

truffle -v gives you the version of Truffle installed on your machine.
node -v gives the version of Node.

1 Like

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.