Help with setting up a scrim for doing a React project (ChefClaude)

Hello, everyone. I’m new to Scrimba, and am having issues trying to create a new scrim for going along with Bob Ziroll’s beginner ReactJS course.

I did create a new scrim, and copied/pasted files from my local VS Code project. But I do not know how to set everything up. I did go to HuggingFace and generate a key for the AI API, and added that to the scrim. But I guess there’s supposed to be a .env file in the root, and that’s for environment variables. But I don’t know what to put in it. And when I try to run the project, I get an error stating that “process is not defined”. Related to the line where I’m trying to call process.env.HF_ACCESS_TOKEN.

It’s my understanding that there is not yet documentation on setting up a ReactJS server properly, in Scrimba. If anyone could give me some pointers, I would appreciate the assist.

V/r, WS2k15

PS. Someone in Tech Support did create a package.json file and copied/pasted some of the code from the course package.json file. I can see those. But I cannot see any dependencies.

Hey @WolfShade2k15,

Tagging one of our teachers @Tom_Chant to get more insight on this.

Potentially it might be a env calling issue so something you can do is to hard code the access token in your project to see if it works. Purely for debugging issues so just make sure you’re not exposing the access token anywhere public. But you’re doing it locally so should be okay.

Hi
Can you share the scrim you are working with? There are various possibilities here, but one is that Hugging Face have just changed their Inference Models. Or also env issues as Roku says.

Hello, Roku and Tom.

Thank you for your time. I suspect that the lack of a .env file might be at least part of the culprit behind the “process not defined” error, since the code that triggers that is trying to reference “process.env.HF_ACCESS_TOKEN”, which I did set as part of the scrim environment variables.

I can try to share my scrim (again, totally new to all of this). I’ll hold off on hard-coding the token until I un-share it. It’s not private, just unlisted, so I think I might be able to just drop you a private message with the link to it. If that doesn’t work, let me know.

Again, thank you both for your time and consideration.

V/r, WS2k15

Okay.. I apparently can’t send PMs. I’ll just post the link, here.

Not sure if you could access it when unlisted, so I made it public.

Vr/, WS2k15