Learning Truffle

Here you can ask questions related to this specific course section.

2 Likes

Thy is the Truffle section later this late in the course when truffle has already been used in previous sections? Perhaps you should move this section to the beginning of the course? @filip

1 Like

Hey @Capplequoppe, hope you are well.

Truffle is not present nor used in Ethereum Smart Contract Programming 101, it just use remix, so basically for some new students they have never seen truffle, thats why its on this course :nerd_face:

If you have any more questions, please let us know so we can help you! :slight_smile:

Carlos Z.

1 Like

I know @thecil, sorry if I was not clear.
In this course (201) the section Learning truffle comes after Openzeppelin where truffle is assumed to be known already in the third video.
My suggestion was just to get an introduction to truffle before the Openzeppelin videos.
Also, now with the updated version of the course I am not sure in which section Visual Studio Code is first introduced, because before the Openzeppelin section only remix is used and then in the third video of Openzeppelin we are already in Visual Studio Code using truffle.

I hope I did not make it even more confusing now…

1 Like

Hello everyone. I’m having some trouble installing Truffle on Win 10 x64. I’ll try to find an answer on my own and if I do I will delete this message. Other wise I’ve posted a screenshot of what I have going on. I install node.js no problem. Then in command/terminal, when I excecute “npm install -g truffle” this is what happens. Any help will be greatly appreciated:

@NextGen33 Have you tried reinstalling truffle?

npm uninstall -g truffle
npm install -g truffle

From what I get see in the error messages on the lines that start with: npm ERR!,
it seems that some files already exists that the installer expects NOT to exist.

This is why it might help to first do the uninstall.
if you still get the same error message one suggestion is to use the --force flag when installing, as shown in the picture you sent.

That is:

npm install -g truffle --force

Not though the warnings associated with doing this…
Hope it works for you

2 Likes

Hey @NextGen33

Can you run the command truffle -v and tell me the output?

Cheers,
Dani

Hey @NextGen33

Run the full reinstallation as suggested by @Capplequoppe :slight_smile:

Hey, using the --force did it!!! Thanks a ton! Uninstall/Reinstall didn’t do anything, but with --force after all the errors it still installed and now I see this! Looks like I can continue with the course. Many thanks

2 Likes

Yes I found this a bit confusing too. The openzepplin section before this truffle section in this course uses truffle so anyone having no experience with truffle yet and encountering it in the openzepplin section may be a bit lost. Would future updates of the course be able to fix this? As well as go through a macOS version of using truffle and solidity with xcode? @thecil @dan-i @filip

1 Like

Hey @mervxxgotti

I will discuss your consideration about Truffle in the OpenZeppelin module.

About Truffle and Mac OS, the usage and commands are exactly the same ones.

About Xcode, that’s just a text editor with a Terminal included. Do you have specific questions about it?

Cheers,
Dani

1 Like

You are right here, thank you for notify it, we already moved those 2 categories to the proper order!

Carlos Z

3 Likes

@dan-i @thecil thank you for the quick response!!

@dan-i @thecil since I ran >truffle develop, now when I run >truffle console, instead of running truffle, I’ve now been permanently running in truffle, what is the difference? Just curious. Also, how do I switch it back to truffle console?

Thanks!

Hi @mervxxgotti

What you are running with truffle develop is a local blockchain in your terminal, you need it to deploy your contract.
When you run truffle develop you are automatically in the truffle console.
If you don’t want to use ganache-cli you can use the gui version. The gui version is usually good for beginners but is not really used by professionals.

You can choose the blockchain that suits you the best.

Cheers,
Dani

I’ve used Truffle in the past, with no problems. I used Atom before, this time I am using Visual STudio Code, only difference.

Now when I am trying to compile my helloworld contract, I get this error which I have never seen before:

Error: TypeError: soljson.Pointer_stringify is not a function
    at Object.compile (C:\Users\Ben\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\workflow-compile\legacy\index.js:72:1)

and ideas?

I deleted all the files, and then started over from the beginning of creating the files.
Before I added the Helloworld contract, everything compiled great. Then once I created and wrote the helloworld.sol file, now I get the error when trying to compile.

Okay, I re-started again, and I got it to work but ONLY if I wrote the pragma statement like this:

pragma solidity >=0.4.22 <0.9.0;

and then didn’t change the compiler version in the truffle-config.js file.
Does that mean that my Truffle version does not have the 0.8.0 compiler?
How can I find that out?

** Okay, New update. :slight_smile: I uninstalled and re-installed Truffle and created all new files again, and now it is working correctly. I am not sure what it was, but if anyone gets the same error when trying to change the solc in the truffle-config.sol file, re-installing Truffle fixes it. **

Sorry for all the drama.

Thanks. Ben

2 Likes

Hi guys,

I’m also experiencing problems with installing Truffle. I did all the steps that I found here in the forum like:

  • Uninstall Truffle
  • Reinstall Truffle
  • Uninstall Truffle
  • Reinstall --force

Is there something that i’ve been missing?

Hope to hear from you.

Schermafbeelding 2021-03-24 om 07.28.25

@dan-i this is the ouput I get when command truffle -v

Schermafbeelding 2021-03-24 om 09.16.24

Schermafbeelding 2021-03-24 om 09.39.58

Hi @thomascarl

You need to sudo: sudo npm install -g truffle

Regards,
Dani

1 Like