Advertisements I was going through a course in OpenAI’s API using an in-browser jupyter notebook page but wanted to copy some example code from there into a local IDE. I installed Python and the jupyter extention in VS Code and the OpenAI library. My code is below: import openai import os # from dotenv import… Read More Do I need any environment variables set to execute some code, call openai's api, and return a response?
Advertisements So i’ve read many topics and lose so much time cause of this issue. My components don’t load anymore and i’m receiving this error in my console : ‘FirebaseError: Firebase: Error (auth/invalid-api-key).’ (I specify that is my first project using firebase). About my firebase.config.js : import firebase from ‘firebase/compat/app’; import ‘firebase/compat/auth’; const app =… Read More Firebase + React auth not working with my .env
Advertisements This is my react fontend app. to pass data from node.js backend, I need to successfully pass API’s url. currently im setting the address to my localhost. I am struggling to path process.env.API_URL to my config file. my files structure is .src – config * config.js – .env .webpack.config.js my .env file is API_URL=http://localhost:3006… Read More How can I pass environment variables by using dotenv in react app ? I get undefined
Advertisements I am implementing Stripe in my project and getting this error on the browser: Failed prop type: The prop `stripeKey` is marked as required in `ReactStripeCheckout`, but its value is `undefined`. I’m storing my publishable key in a .env file in the client folder: REACT_APP_STRIPE = pk_mykeykey And in my component, I’ve assigned the… Read More process.env.REACT_APP_STRIPE returns undefined
Advertisements i have to pass a .env variable to a Stripe object, but i´m getting the following error: Uncaught (in promise) IntegrationError: Please call Stripe() with your publishable key. You used an empty string. Here is the code import Stripe from "stripe"; const stripe = new Stripe(process.env.NEXT_PUBLIC_STRIPE_SECRET_KEY); .env >Solution : In Next.js you should declare… Read More .env variables is an ampty string