Installing Yarn (error)

Hello Everyone!

I have started the Algorithmic Trading course a few days ago and now I seems to have stucked with yarn installation.

When I am following the instruction from the video when we want to install yarn I am getting the following message.

So as far as I understand this I need to enable some scripts in order to go on with the course. I am trying to find out right now how can I do this but if you would lend me a hand, that would be very much appreciated.

Thank you in advance!

1 Like

Hey @Riki, hope you are great.

Another students have the same issue, one of them try this tutorial and made it work.
https://windowsloop.com/enable-powershell-scripts-execution-windows-10/#:~:text=%20Steps%20to%20Enable%20PowerShell%20Scripts%20Execution%20on,“.%20This%20means%20the%20scripts%20are...%20More

You can try the same or you could also just use the windows console (cmd), i always suggest to use both to verify if you are having console issues or code issues.

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

Carlos Z.

Hello thecil!

Thank you very much!

The link you have sent me above actually solved the issue.

Now I was able to move a little bit on and now I am getting this :smiley:

I was able to register to make my sandbox account but I am unable to go after this point. I am not really sure what is the issue, still a beginner on this.

I am attaching my atom picture for setting up the things in order to use the API (will do another reply for this).

Also I would like to ask that which is the easiest way to find a question because there is a high posibility that somebody else already posted this issue? If I am on the javascript programmin section and as I am searching for yarn, nothing comes up for me as a searched result.

Thank you very much for everything!

1 Like

Here is my Atom picture for setting up my sandbox fake m account

1 Like

Seems I got a move ahead.

I have searched this site and found out that if I put .catch(console.error); that is solving the issue. But now I am receiving this one.

1 Like

I need to see your code to understand the error, but is a syntax error, meaning OR the .catch is not placed properly or its body logic is missing.

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

Carlos Z.

By my code do you mean what I have written in Atom? Because if so I have posted another picture of it a bit above.

1 Like

You can use the “Preformatted Text” Button to encapsulate any kind of code you want to show.


function formatText(){

let words = “I’m a preformatted Text box, Please use me wisely!”

}

prefromatted_text-animated

Carlos Z.

Okay. Doing it now. Here it is.

const GeminiAPI = require("gemini-api").default;
const secret = "3XB68LEPvG3B5xRHE6s9Pj2xLQ4Z";
var key = "account-XF3TfPtTNzb1d4F6ocSv";
const restClient = new GeminiAPI({key, secret, sandbox:true});

restClient.newOrder({amount:10,price:100,side:"buy",symbol:"btcusd"})
.then(response => console.log(response));
.catch(console.error);

So here is what I have found ( If I am correct) .

The reason I am getting the syntaxerorr is because the .catch(console.error) code. But if I put it out from the list I am getting the previous issue which is the trace warning one.

UPDATE: I believe he doesnt like the . on .catch in the beginning, which I don’t understand why.

I have also tried it on the windows console, getting the same error(s).

you are missing the function body for the response.

restClient.newOrder({amount:10,price:100,side:"buy",symbol:"btcusd"})
.then(response => {
  console.log(response)
})
.catch(console.error)

Keep in mind the basic structure of the async function for the Gemini API tool:

restClient.functionName({arguments})
.then(response=>{
console.log(response)
})
.catch(console.error)

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

Carlos Z.

Sucess!

The problem wasn’t the function, the issue was the .catch(console.error) had a semicolon in my end, the I ran into a Signature error which I also fixed so I hopefully will finish the course now.

Also I will have some more questions once I finish with the course 100% but I will open another topic for that. Thank you very much for the help! Really appreciate.

2 Likes