My baby steps with Motoko

hello everyone, i am trying to my first line of code on motoko, i am not sure on issues preventing this from building tho.
Main.mo file
actor {
public func greet(name : Text) : async Text {
return “Hello, Dotun you are welcome to dfinity”;
};
};
index file html>

Press button, receive Hello!

Press me!

https://github.com/dotunwilfred/mtoko_babysteps.git
@Ori

1 Like

You seem to have multiple dfx.json in that git. Could you start from scratch and avoid running dfx new or having multiple dfx.json?

Are you trying to run dfx build from the root of that git repository?

Your motoko code seems fine, but the project is embedded in the other so it might be you’re not doing things from the right place.

2 Likes

Yes, go to the mtoko_babysteps folder, delete everything in there so it’s empty, then just run this command once:

dfx new hello_world

Try from there…

1 Like

corrected version here

6 Likes