Questions tagged [environment-variables]

Environment variables are a set of dynamic named values that can affect the way running processes will behave on a computer.

Filter by
Sorted by
Tagged with
-1 votes
1 answer
10 views

Handling environment variables in a MERN stack with ReactJS and Node.js

I have a mern website and now I want to host it but I have seen that you must not put .env on repository but without env my website will not run what should I do. I am going to host it on hostinger I ...
Y S's user avatar
  • 1
0 votes
1 answer
22 views

Set Environment Variables in UWP App not in the source code

is there a way to set environment variables in a UWP app in a launchsettings.json file or in any other way that directly in the source code? The visual studio properties for UWP apps seem not allow to ...
Brudi_Voeller's user avatar
0 votes
1 answer
12 views

how to interpolate workflow level variable into another workflow level variable github actions

I'm new to github actions. Below is my workflow: name: Example on: [push, workflow_dispatch] env: APPNAME: 'myapp1' APPURL: "https://mybank/$APPNAME/widgets/hello.json" jobs: test: ...
Ashar's user avatar
  • 2,850
0 votes
0 answers
14 views

Reinstalled Conda Not Recognized and Cannot launch Anaconda Navigator

I had to uninstall/reinstall Anaconda (20232.03-1 64bit) on Windows 10. I now cannot get the Anaconda Prompt to recognize any conda statements nor can I launch the Anaconda Navigator. If I go into the ...
PyGuy2000's user avatar
0 votes
2 answers
25 views

Why is my API key showing as 'undefined' when I set it up as an environment variable in my Node.js backend server built with Express?

API_KEY is showing as 'undefined' when I set it up as an environment variable My API_KEY is showing as 'undefined' when I set it up as an environment variable. The API call works when I hard code the ...
dcblanton78's user avatar
0 votes
0 answers
18 views

Firebase API Keys and EXPO / React Native

I'm quiet new to firebase and I've read up that it's okay to expose the API Keys and that the security rules should be configured in firebase. Would it make sense not to want to expose the API keys ...
Max's user avatar
  • 11
0 votes
0 answers
12 views

how to configure environment variables such as banckend api url in an angular application, since the environment.prod.ts files have been deleted?

I would like to put into production an application developed with Angular (version 15.0.1). in this version of angular, the environment.prod.ts files have been removed. how can I configure an apiUrl ...
Brody Gaudel's user avatar
0 votes
0 answers
6 views

Node Version Manager for Windows Blows Away NPM PATH

I have been using NVM for Windows for a while because I work in different Angular projects which require different versions of NodeJS. One issue I have with it is that when I need to switch between ...
David's user avatar
  • 5,847
0 votes
0 answers
37 views

Environment.GetEnvironmentVariable doesn't find my environment variable

I have a .NET 6 project with the following property: internal static DateTime TestNow { get { string timeMode = Environment.GetEnvironmentVariable("TM_MODE&...
Helena's user avatar
  • 1,031
0 votes
0 answers
11 views

Email JS "The Public Key is invalid"

I am using email js for my form submission in React, and I got this message: "The Public Key is invalid. To find this ID, visit https://dashboard.emailjs.com/admin/account, "but I am sure ...
harperzhu's user avatar
0 votes
1 answer
15 views

env reporting environment variables starting with exclamation mark (MSYS2/MINGW64)?

I try to keep my MSYS2/MINGW64 (Windows 10) install updated. Recently, I noticed that a CMake project of mine fails to compile, and it seems it is because it starts including some irrelevant ...
sdbbs's user avatar
  • 4,034
-1 votes
1 answer
25 views

'say' is not recognized as an internal or external command, operable program or batch file

import os def say(text): os.system(f"say {text}") if __name__ == '__main__': print('PyCharm') say("Hello I am Jarvis A.I") Error is 'say' is not recognized as an ...
Saureet's user avatar
0 votes
1 answer
19 views

What might cause environment variables to be missing in my Flask app when deployed on Google Cloud Run?

I deployed a flask app to google cloud run and want to put some API keys into the environment variables (mostly to keep them out of github since I set up continuous deployment from there). However, ...
Kkrockera's user avatar
0 votes
1 answer
16 views

Docker databse initialisation in /docker-entrypoint-initdb.d no access to enviroment variables

I have an influx db image (bitnami/influxdb:2.6.1-debian-11-r34) and a mariadb image (mariadb:10.7.6-focal). Both allow to run initial setup by placing scripts in to the /docker-entrypoint-initdb.d ...
jonathan-dev's user avatar
0 votes
0 answers
21 views

Docker secrets/environment variables only available in -it mode [duplicate]

While trying to debug something I noticed that neither environment variables nor secrets were available when running a bash command on a swarm container. When running the commands in the -it mode ...
jonathan-dev's user avatar
0 votes
0 answers
15 views

Why the 'RUST_LOG' environment variable is not working? [duplicate]

I was working with log and env_logger crate and its documentation says that we can set the RUST_LOG environment variable to different levels to filter out logs of lower-level, RUST_LOG=debug will ...
Sarang Dutta's user avatar
1 vote
1 answer
48 views

Create temporary env variables from .env file

I have a .env file with the following: HOST=localhost PORT=5432 USER_NAME=postgres I also have some commands whose options I want to populate with the environment variables. For example: $(cat ignore/...
Max888's user avatar
  • 2,991
-1 votes
0 answers
20 views

Gitconfig not applying to new user on Ubuntu22.04LTS when switching with sudo -s -u command - how to fix? [closed]

Today I have installed Ubuntu22.04LTS. In that I have a user bob and his git config is like user.name=Bob B user.email=bob@example.com alias.unadd=reset HEAD I have another user sally. When I ...
Vikram 's user avatar
0 votes
0 answers
13 views

Postman, sharing a variable

From the following code, I am attempting to share a timeVariable value to all my tests in a collection. I placed the code in my collection Pre-Request Scripts so that all of my scripts would use the ...
Lorena's user avatar
  • 19
0 votes
0 answers
13 views

Environment Variables In A Shopify React Project

How To Load My Environment Variables In A Shopify React Project? backend - node / frontend - react using vite I need to create a dotenv file and load the vars in the frontend app. thanks in advance
Guilherme G Silva's user avatar
0 votes
0 answers
28 views

How to force remote python interpreter (on docker) to get the Environment Variables from the docker container rather than IDE?

I build a docker image (docker build -t my-image .) based on below Dockerfile: FROM amazon/aws-glue-libs:glue_libs_3.0.0_image_01 USER root RUN ln -sf /usr/bin/python3 /usr/bin/python && \ ...
Jeff's user avatar
  • 7,667
0 votes
1 answer
39 views

How to implement Firebase parameterized configuration in TypeScript for Cloud Functions v2?

I want to use parameterized configuration as firebase team recommended it, but I can't figure out what is wrong with code below. # .env # This file is located in functions folder. LOCATION_FUNCTION=...
Jed Choi's user avatar
0 votes
0 answers
22 views

How to pass dynamically populated job level environment variables between jobs - Github Actions

It is known how to pass a known variable from one job to another as shown in the answer here: How to pass job level environment variable between jobs - Github Actions But, my case is different. In my ...
Ashar's user avatar
  • 2,850
-1 votes
2 answers
51 views

Why should I use `env` over an `object` in React?

I've been using React for a while but always had a question. Why should we use Env instead of an Object? Object has advantages such as: Easy to edit, will reload when saved (Env required to re-run ...
mikenlanggio's user avatar
  • 1,053
0 votes
1 answer
30 views

How to pass job level environment variable between jobs - Github Actions

I wish to read var1=good inside mainjob2, however, it does not print. name: Main Workflow on: push: branches: - main jobs: mainjob1: runs-on: ubuntu-latest steps: - ...
Ashar's user avatar
  • 2,850
2 votes
1 answer
30 views

Github workflows setting and retrieving GITHUB_ENV variables

I'm relatively new to Github Workflows, so I'm learning the syntax as I go. I have a section where I want to check if start_date and end_date have been filled, if not, fill them with the default value....
Shubadecka's user avatar
2 votes
1 answer
93 views

split string line by line and variablize i.e assign it to GITHUB_OUTPUT - workflow

Github action run invokes a powershell that returns as below: Powershell return function: return "$($psitem.Key)=$($psitem.Value)" The return is assigned to a github action variable ...
Ashar's user avatar
  • 2,850
-5 votes
0 answers
20 views

Environmentvariable [closed]

Why we are need to set the Environment variable and what difference could occur during setting the variable as system and as user ? when I am stetting the variable in User variable After JDK ...
suyash singh's user avatar
0 votes
1 answer
53 views

How to fetch value from Azure KeyVault and set as environment variable along with other appSettings values

In below code, I am trying to fetch the secrets from Azure KeyVault and then sets as environment variable and reason for this is that I don't want to read it from appsettings.json file. public static ...
user584018's user avatar
  • 9,880
1 vote
1 answer
47 views

Setting SQLALCHEMY_SILENCE_UBER_WARNING to avoid deprecation warning does not work

A Python package I am working on was built with SQLAlchemy v1.4 and there is no plan to upgrade to v2 in the foreseeable future. I have set up the installation requirements accordingly, so that SQLA ...
tospo's user avatar
  • 626
0 votes
0 answers
17 views

initContainer does not start when passing an env and there are no logs

I am using a single Docker image, which contains a .war and a .jar to execute as both an initContainer and a container. If the environment variable DATA_MIGRATION with value true is present, then the ...
bobbyrne01's user avatar
  • 6,125
1 vote
1 answer
26 views

Using secret environment variables in React

I'm using Cloudflare pages to deploy a react app and I'm trying to access my Environment Variables. From Cloudflare Pages docs, I saw that I had to create a middleware function to get the variables, ...
Mrtsm's user avatar
  • 25
0 votes
1 answer
40 views

Why do I get an error while installing gopls through VScode

I started learning Go and wanted to setup environment enter image description here It all started by installing an extension for VScode. Then I got this huge error: Tools environment: GOPATH=C:\Users\...
MorS's user avatar
  • 9
0 votes
1 answer
17 views

How to use a .env file while deploying it on Render

How to use a .env file while deploying it on Render. I pushed my complete source code to Github (except .env and node_modules) where I put my .env into .gitignore. On github, .env file is not there. ...
Aman Verma's user avatar
0 votes
0 answers
20 views

Cordova 11.1.0 - Can't access Cordova hook environment variables using Node.js - returns undefined

I've tried running hooks for an old application using Cordova, Node.js and Angular. It is trying to get an environment variable from process.env like process.env.CORDOVA_CMDLINE but when console ...
Francisco Martinez's user avatar
-1 votes
0 answers
34 views

Why is my Python code failing to accept the password stored in environment variables on MacOS Monterey using Mu Editor?

Python Unable to Find Environment Variable on MacOS While learning to send email with Python, I discovered environment variables to store passwords. Looked up how to on youtube. Followed instructions ...
MaxHatter's user avatar
-1 votes
1 answer
33 views

Best way to add environment variables to an Angular app during Google Build?

I am new to Angular and deployment in general. I use Google Build and Google Run to build and deploy an Angular app. I've set up a trigger for continuous development with a Cloud Build configuration ...
MariaJ's user avatar
  • 1
0 votes
0 answers
16 views

Getting error: FATAL ERROR: jwtPrivateKey not defined

const Joi = require('joi'); Joi.objectId = require('joi-objectid')(Joi); const mongoose = require('mongoose'); const users = require('./routes/users'); const auth = require('./routes/auth'); const ...
Milan's user avatar
  • 1
0 votes
0 answers
23 views

Putting Short SHA in ENV in dockerfile, when built from Quay build trigger

Apologies if I'm posting in the wrong place/site. I'd like to access the Short SHA (from latest GitHub commit) via an ENV variable inside my Dockerfile. But, my build is kicked off by a Quay build ...
Dan's user avatar
  • 477
0 votes
0 answers
39 views

Is there a way to access .env.local variables directly in my Cypress test without hard-coding them? [closed]

Is there a way to get environment variables from .env.local directly into your Cypress tests? I am currently hard-coding them into my cypress.config.ts file, which I would rather not do. I tried this ...
Sean E's user avatar
  • 3
0 votes
1 answer
46 views

How to set up browser environment variables in nextjs when `"type": "module"`?

I am working on a nextjs project and I am not being able to set environment variables that work and browser level. console.log(process.env) always returns {} in the javascript console and any variable ...
Iván's user avatar
  • 310
0 votes
1 answer
23 views

Set EnvironmentName at publish time and use at runtime

Using c# .net6, how can I set the EnvironmentName at compilation or publish time and access it at run time? Is this possible? I tried passing as a publish parameter dotnet publish -p:EnvironmentName=...
Ignore's user avatar
  • 41
0 votes
0 answers
24 views

How to maintain environment variables for C# application deployed in Kubernetes other than configmap

How to maintain environment variables for C# application deployed in Kubernetes other than configmap? Currently all environment variables for pod is passed from configmap. But due to increase in no.of ...
Akash's user avatar
  • 1
0 votes
2 answers
41 views

Replace string with custom environment value

I need to replace a specific string inside a file with the value of an environment variable, but I only get and empty value. Here my code: - template: src: myfile.yml dest: /etc/myfile.yml ...
Daniele's user avatar
  • 498
-1 votes
0 answers
40 views

Best practice to use AWS Secrets Manager with EKS and rotate regularly

We are currently considering externalizing secrets for Kubernetes (EKS) by utilizing AWS Secrets Manager. Our proposed approach involves using the K8s Secrets Store CSI Driver and ASCP to retrieve ...
Pauls Baby's user avatar
-1 votes
3 answers
55 views

PYTHONPATH from launch.json not visible in Python script (VS Code)

I would like to import methods from a directory one level above my current working directory. One way to do this is to manually append the directory to sys.path. I found a better solution for VSCode ...
vpk's user avatar
  • 1,230
0 votes
1 answer
30 views

How do I persist environment variable changes in python?

import os os.environ['my_variable'] = 'hello world' you are able to edit the environment variable while the python process is running but as soon as the python process is terminated, the environment ...
Wilson Wong's user avatar
0 votes
0 answers
37 views

JAVA path in Linux environment variable warning

enter image description hereI just installed Kali and am Java 17 (JDK & JRE) and am trying to configure JAVA_HOME as an environment variable. But Im getting [WARNING] Unable to autodetect 'javac' ...
Sanmay thota's user avatar
0 votes
1 answer
18 views

Understanding the distinction between "SENTRY_DSN" and "SENTRY_LARAVEL_DSN" environment variables in Laravel's Sentry package

What is the difference between the "SENTRY_DSN" and "SENTRY_LARAVEL_DSN" environment variables in the Sentry package within Laravel? Need clarification or guidance to a reliable ...
backenderman's user avatar
0 votes
1 answer
36 views

What is the MAX length we can setup for environment variable in Linux?

I am trying to set an environment variable the value of which happens to be too long. As soon as I am done with the export I am getting this error for all the commands. -bash: /usr/bin/ls: Argument ...
tushar_ecmc's user avatar

1
2 3 4 5
270