konhito / AI_IMAGE-GENERATION

0 stars 0 forks source link

SyntaxError: Unexpected token 'B', "Billing ha"... is not valid JSON #2

Closed ShivankK26 closed 1 year ago

ShivankK26 commented 1 year ago

Facing this error while making API request. Can you please help @konhito. How did you solve it?

Image

konhito commented 1 year ago

share me your code

ShivankK26 commented 1 year ago

which part do you want?

konhito commented 1 year ago

everything

ShivankK26 commented 1 year ago

Give me a minute I'll upload it on github

ShivankK26 commented 1 year ago

There was some issue while uploading the repo so i've made 2 repos. CLIENT SIDE: https://github.com/ShivankK26/AI-Image-Generator-App

SERVER SIDE: https://github.com/ShivankK26/AI-APP

konhito commented 1 year ago

ok im checking the issue

ShivankK26 commented 1 year ago

Okay. Thanks a lot!

konhito commented 1 year ago

its working fine for me Screenshot from 2023-06-04 12-14-40 Screenshot from 2023-06-04 12-15-06 use my server file and do npm i and make .env Screenshot from 2023-06-04 12-17-09 make sure mongo db is connected and on mongodb got to networks then do this so anyone can connect to your server Screenshot from 2023-06-04 12-19-33

ShivankK26 commented 1 year ago

my server file as in? I didn't get it

ShivankK26 commented 1 year ago

I also have a .env file and I've added the GPT API link to it.

konhito commented 1 year ago

i mean i dont have ur .env fle so i used "my server file"(from my project)...u can use yours

ShivankK26 commented 1 year ago

Okay.

ShivankK26 commented 1 year ago

But i'm still getting error..

konhito commented 1 year ago

on your terminal monondb is connected right?

ShivankK26 commented 1 year ago

yes

konhito commented 1 year ago

Screenshot from 2023-06-04 12-29-34

ShivankK26 commented 1 year ago

haha..lol

ShivankK26 commented 1 year ago

I've just connected mongoDB using the atlas link and used it in my .env file..nothing else...is this right?

konhito commented 1 year ago

change network access on mongodb

ShivankK26 commented 1 year ago

how to do it?

konhito commented 1 year ago

cuz ur ip changes everday

ShivankK26 commented 1 year ago

ohkk

konhito commented 1 year ago

Screenshot from 2023-06-04 12-19-33

ShivankK26 commented 1 year ago

yup, did it.

ShivankK26 commented 1 year ago

what next?

konhito commented 1 year ago

still getting error?

ShivankK26 commented 1 year ago

Screenshot 2023-06-04 at 12 36 05 PM

ShivankK26 commented 1 year ago

ya man it is still showing the same error

konhito commented 1 year ago

send me your terminal photo

ShivankK26 commented 1 year ago

okay

ShivankK26 commented 1 year ago

Screenshot 2023-06-04 at 12 38 27 PM

Screenshot 2023-06-04 at 12 38 38 PM

Screenshot 2023-06-04 at 12 38 49 PM

Screenshot 2023-06-04 at 12 38 49 PM Screenshot 2023-06-04 at 12 38 55 PM Screenshot 2023-06-04 at 12 39 01 PM

Screenshot 2023-06-04 at 12 39 07 PM Screenshot 2023-06-04 at 12 39 12 PM

konhito commented 1 year ago

w8 u have installed axios right?

ShivankK26 commented 1 year ago

no

konhito commented 1 year ago

wow dude

konhito commented 1 year ago

follow the video

ShivankK26 commented 1 year ago

i think i missed it..could you please tell me the commands to install it?

konhito commented 1 year ago

i dont remember exactly but npm install axios this shoud be working

ShivankK26 commented 1 year ago

ohkk..and i should run this in client dir or server one?

konhito commented 1 year ago

a.... server i guess

ShivankK26 commented 1 year ago

did it...but it's showing error again...huhh

konhito commented 1 year ago

its beyond my expertise...sorry i cant help u

ShivankK26 commented 1 year ago

Okay, no issues. Thank you so much for your time and efforts!

konhito commented 1 year ago

Screenshot from 2023-06-04 12-56-56 ok