Truffle Introduction

@filip @gabba

Hi guys,
I’m running windows 10 trying to get truffle to work. What a pain! I’m running powershell as admin, and have installed node and truffle. When I run truffle init, this is the error I get:

I’m also searching for a solution, but I like to cover all my bases.

Thanks for your help in advance.
Dustin

Update: I found this, but no word on the fix, ugh. Maybe I’ll just get my mac out - lol.

Hi @DeCryptolorian

Hmm i never get this error can you try to set the correct version of ssl ? run this in powershell

[Net.ServicePointManager]::SecurityProtocol = "Tls12, Tls11, Tls"

But yes if you have a mac it ll be easier for development , windows is really painful.

As you can see in the github issue this is a new error… Try to install an older version of node and truffle. node v10.21.0 is supposed to be stable

1 Like

Thanks Gabba, I might pick up a Mac laptop today. Going to look at them and if I am serious about coding I will. :slight_smile:

@gabba Hi Gabba, I am all set. It is working nicely now. You were right much easier to develop on mac.

1 Like

Great @DeCryptolorian enjoy coding now :wink:

I have a basic question about running Truffle/Ganache on an older computer. The only Windows unit I have is an older Windows 8 machine. Have any of you had issues running the latest versions of these programs on an older computer?

Side note, if you ask around or search you’ll get a million different answers, but part of the reason why I don’t use the above mentioned computer is because the Avira Antivirus takes up so much memory (and using a Chromebook for browsing). If you have any lightweight antivirus recommendations so I can use this laptop efficiently, I’d greatly appreciate it.

Thanks

Yes. I ran as administrator.

Hi guys is there a way to completely remove all components of ganache and truffle etc from my entire computer using command line?

I had a working suite until I started this course and was encouraged to install an older version… and now a few files seem to be corrupt and everything is buggy…

I think I would like to re install the newest version I WAS running before I started this course as it worked… :slight_smile:

$ sudo npm remove truffle does not fix this issue… so it could be corrupted dependencies?

Sorry for spam but also my ganache is broken… everything is broken… to re iterate before I started this course I had a working functioning truffle suite I was able to work with, now I don’t… poor me

Thank you! This saved me.

Hello @filip,

In your Truffle example, you were able to reset/reuse “instance” variable. However, it gives this error message when I try to do same:

truffle(ganache)> let instance4 = await HelloWorld.deployed()

let instance4 = global.__await_outside_result; void delete global.__await_outside_result;
^
Uncaught SyntaxError: Identifier ‘instance4’ has already been declared

  1. How does one clear the variables?
  2. How can I reuse same variable like you do?

Running on Ubuntu 20.04 - Truffle v5.0.42 - Ganache-2.1.1

Please Help!

Hi @ponchooo

By saying everything is broken/buggy can you be more explicit ?
For example can you send us a screenshot of the error or can you copy the logs ?
What is it buggy exactly ?

In order to help you we need to know what version of node and npm you have install, are you using windows/linux/mac .

run

node --version
npm --version
whereis truffle
truffle --version
cat package.json

Thx you

1 Like

@K.Deorgins
To be able to reuse it don’t use “let” .

Here you are trying to define a variable that already exist

truffle(ganache)> let instance4 = await HelloWorld.deployed()

Here you are just reusing instance4 and overriding it’s content

truffle(ganache)> instance4 = await HelloWorld.deployed()
1 Like

Hi all - For those getting the EPROTO error -

Try using a different wifi or using your phone as a hotspot. It gets around the SSL error.

Good luck!

Mac Truffle Install Issue (solved)

Whatsup, I had the hardest time installing truffle on mac. I changed my read write security settings on node_modules folder and this fixed the problem. I’m gonna switch it back now. I downloaded all kinds of unnecessary stuff. Trying to save someone else the headache …

try this…found in stack overflow
#Powershell Windows

PS C:\> Set-ExecutionPolicy RemoteSigned 

@filip
can you please explain the back end of migration, that you have mentioned in the video?

I had this problem too. I backtracked and found that when I tried to create the “instance” call (not sure exactly what instance is quit yet), but truffle returns "

“Uncaught SyntaxError: Identifier ‘instance’ has already been declared”

So, I just made “instance2” instead and that worked for both getMessage and setMessage.

Not sure why, but I’d thought I’d post if anyone has further insight …

actually this was explained in the next video … i was writing “let instance = …” when I should have been writing “instance = …” because I had already declared it.

1 Like