#Cloning A project from Github

1 messages · Page 1 of 1 (latest)

timber ivy
#

Is there anyone who can help me in cloning a project from github in working condition? I mean I have cloned a website but when I open it using npm start , there's just white screen showing in Chrome instead of actual website.

ashen templeBOT
#

<@&987246452180930620> please have a look, thanks.

ashen templeBOT
#

While you are waiting for getting help, here are some tips to improve your experience:

Code is much easier to read if posted with syntax highlighting and proper formatting.

If nobody is calling back, that usually means that your question was not well asked and hence nobody feels confident enough answering. Try to use your time to elaborate, provide details, context, more code, examples and maybe some screenshots. With enough info, someone knows the answer for sure.

Don't forget to close your thread using the command </help-thread close:1027500463647621170> when your question has been answered, thanks.

marsh jungle
#

This is a Java server so you'd find more luck with a JavaScript server

#

But for your question, try running npm install first

sour galleon
#

Also are there any errors in chrome dev tools or the console? @timber ivy

timber ivy
#

I don't think there's any issue in chrome dev, as I have run my project on it before

timber ivy
marsh jungle
#

yes you have an issue with running a javascript project from github

#

and you have provided no details of the error, the project, or anything

#

"i get a blank screen in chrome when I run npm start" doesn't tell us anything

timber ivy
#

Sorry to sound rude, but how this can be an error related to javascript, Its just I'm new to Github, never cloned anyone's project before.

timber ivy
#

This is how terminal is showing no error after npm start

thick holly
timber ivy
#

And this is what screen looks like

#

I did go

thick holly
timber ivy
#

Its showing something like this...

thick holly
timber ivy
#

yep, I did

sour galleon
timber ivy
#

He has written nothing in README section

thick holly
#

The error is saying that you gave an invalid key, so you need to fix that

timber ivy
#

Yeah that's what I'm getting to

#

But how to do that?

#

Like do I need to his repo again?

thick holly
#

It's probably written on his repo what to do I guess

timber ivy
#

This one is repo

sour galleon
#

whole site shouldnt break because of missing key

#

export const commerce = new Commerce(process.env.REACT_APP_CHEC_PUBLIC_KEY, true);

#

You need to pass key as env variable

timber ivy
sour galleon
#

I though change commerce to a function which will try return commerce

#

export const commerce = () => { try { return new Commerce(process.env.REACT_APP_CHEC_PUBLIC_KEY, true); } catch (e) {console.log(e) return EmptyCommerce ??? } }}

#

just format it

timber ivy
#

Do I need to write this on app.js file?

sour galleon
#

no

timber ivy
#

Done

#

Now?

modest prism
# timber ivy Now?

Why are you cloning the repo? It looks like it's using library that you need to register for an API key and it looks like it may end up costing you: https://commercejs.com/pricing. Not clue if it's any good, never heard of it.

thick holly
#

If a public key is needed then the website shouldn't be able to work without

sour galleon
#

Doesn't seem user friendly

modest prism
#

I mean I'm not sure this github project was intended to be used by others. I think somebody was probably just playing around with a library.

sour galleon