Javascript bot programming using Gemini API, NodeJS and CryptoCompare - DISCUSSION

Hey @Leedecker425, hope you are well.

Could you please provide an screenshot about your issue? Which is the process that you are following to use npm?

Carlos Z

@thecil, I am getting the same type of error. If i understand correctly, you suggested to remove this line from the code:

global.fetch = require('node-fetch');

removing this line i get

referenceerror: fetch is not defined.

Didnt attach snapshots because its pretty similar to @Riki 's error messages

@thecil, ignore my previous comment. I followed this post and found the solution.

Thanks,
Sk

1 Like

// Hello bot-mongers

Iā€™m stuck at the ā€œyarn add gemini-apiā€ step in powershell.
all the steps in the ā€œGemini Yarn Installā€ video worked fine up to this point.
Further more, I am unable to find the webpage Ivan uses to copy ā€œyarn add gemini-apiā€ from.


edit: resolved. If u encounter this prob too, check out reply #77 in this thread.


@LORDKALVIN

ok, this helped out! thx CryptoKomuna!

// Hello bot-wranglers

@lordkalvin back at it again in need of MORE tech support lol.

Iā€™m 82% into the Algorithmic Trading & Tech Analysis class.

Iā€™m on the " Using Gemini ā€“ BUY ORDER " lesson.

Iā€™ve followed instructions perfectly as far as I can tell, but Iā€™ve run into an error when sending the buy order from powerShell:

ā€œunhandledPromiseRejectionā€

Iā€™ve attached a screen shot including where Iā€™m at in the video, as well as the code from my Atom n Powershell.

Thanks for your help.


@LORDKALVIN

1 Like

Hey @lordkalvin, hope you are well.

please take a look to this reply which can be related to your issue, let me know if that solve the issue :nerd_face:

Carlos Z

@thecil

// Hey man, doin v well. thx so much!

Unfortunately, the linked reply dint seem to fix my issue:

  • my package.json file dint have a node-fetch property, so I added it, then put the ā€œ2.6.1.ā€
  • I saved it, deleted my node_modules folder, then entered npm install into powershell.
  • powershell gave me an npm WARN notification, which I ignored, n tried to run my node index.js file again
  • it gave me the unhandledPromiseRejection again, so Iā€™m still stuck.
  • my package.json also doesnā€™t have a cryptoCompare property like in the linked reply. Iā€™m totally stuck at this point.

Willin to try anything to get past this point as Iā€™m SO close to the end lol.
-thx so much.


@LORDKALVIN


edit: heres a pic of where I am

// Hey @thecil

I actually found a really simple fix! I just made a nu API key, but I made a ā€œprimaryā€ instead of ā€œmasterā€! Iā€™m on to next lesson FINALLY.

Iā€™m not sure why the ā€œmasterā€ one dint workā€¦ but w/evs lol, TIME TO MOVE ON!!!

3 Likes

Hey @nev, could u post screenshots of what this looks like in ur atom? Iā€™m stuck AGAIN, and I wanna try ur solution. thx so much

1 Like

Thanks for posting this. I was stuck and it worked for me too!

1 Like

@bcbeltran

DOPE! can u post a screen shot of ur code that worked? I still havent gotten past this point. thx so much!

// SOLUTION!!

WE DID IT TEAM.

We finally UNSTUCK from the CryptoCompare Setup lecture.

if ur havin probs on this vid read the docs:
cryptocompare on github

  • paste this into ur powershell, then press enter:
    • npm install --save cryptocompare
  • On the github docs, under the ā€œusageā€ section uā€™ll see this line:
    • ā€œIf you are using this in Node.js, you will need to use node-fetch .ā€
  • follow the node-fetch link, n read those docs.
    • paste this into ur powershell then press enter:
      • npm install node-fetch
  • try to run ur code again, it should work!

Feel free to HMU if u need any help! Weā€™re a community, n helpin ea other is the ONLY way to make it thru this difficult, egghead ass programmin shit LMAO


@LORDKALVIN

1 Like

Thanks! This helped me as well :smiley:

1 Like

did u ever solve this? Iā€™m runnin into this exact prob now

agree! I feel like if this course is gonna continue to be offered, some updates r extremely nec. every single lecture has beena WRESTLIN MATCH lol

Unfortunately I was unable to solve the issue.

1 Like

Hi! when I tried yarn add gemini-api, got this error message:

yarn : File C:\Users\ldvcn\AppData\Roaming\npm\yarn.ps1 cannot be loaded because running scripts is disabled on this sy
stem. For more information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.
At line:1 char:1

  • yarn add gemini-api
  •   + CategoryInfo          : SecurityError: (:) [], PSSecurityException
      + FullyQualifiedErrorId : UnauthorizedAccess
    
    

Multiple timeā€¦
What can I do? It is really necessary to change ExecutionPolicy on my Windows?
Thanks!

Its referred to a limitation on powershell to run scripts commands, you can try to use windows command prompt instead (CMD), it should not have any limitations.

Carlos Z

Thank you! In CMD is OK.

1 Like