Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [.env]

The tag has no usage guidance.

.env
-1 votes
1 answer
50 views

Issue with Environment Variable in React - Getting undefined in URL

.env REACT_APP_BASE_URL=https://mysite.azurewebsites.net/ .js const baseUrl = process.env.REACT_APP_BASE_URL; const url = `${baseUrl}WP/SiteLoginAPI/`; console.log('Constructed URL:', url); Problem ...
Mudasir Habib's user avatar
0 votes
2 answers
30 views

Error: P1000: Authentication failed against database server at `localhost`, the provided database credentials for `postgres` are not valid

api git:(main) ✗ pnpm prisma migrate dev Environment variables loaded from .env Prisma schema loaded from prisma/schema.prisma Datasource "db": PostgreSQL database "postgres", ...
Jaskaran Singh's user avatar
0 votes
1 answer
12 views

Not able to load .env variables from the root directory into the react project built using Vite

So, the problem I am facing is that I have front-end code in the frontend folder and .env file in the root folder. When I try to import the env variables into the folder from the root directory it ...
Gurneesh Budhiraja's user avatar
1 vote
1 answer
34 views

SpringBoot won't read mail properties from .env.properties file

I'm using a .env.properties file for sensitive data such as Database and Mail credentials. The database credentials are being picked up by Spring properly, but the mail credentials are not. Here is an ...
Jez's user avatar
  • 55
0 votes
2 answers
49 views

Accesing .env in Node.js / Express.js

import validator from 'validator'; import { Users } from '../../models/auth.js'; import { jwtSignPromise } from '../../utils/jasonWebToken.js'; import dotenv from 'dotenv'; dotenv.config(); const ...
SerchoD's user avatar
0 votes
1 answer
61 views

How to include .env file in my python package using pyproject.toml?

I have the following folder structure: program_root/ - src/ - tests/ - data/ - templates/ - docs/ - build/ - dist/ - ...
Devarapalli Vamsi's user avatar
0 votes
0 answers
33 views

How to load env vars from .env before running C# tests through VS Code

I am trying to get rid of the .runsettings file which I have in my project repo and keep all my config variables in a single .env file. The one place where I am stuck in is in the scenario when ...
tech-ebe's user avatar
0 votes
0 answers
36 views

Trouble encrypting .env.production file using dotenvx in node project as .env.vault file format is deprecated

I'm using dotenvx CLI with NPM and NodeJS for injecting environment variables but when I try to encrypt my production file following the steps from their documentation it either throws an error or ...
slavic max's user avatar
2 votes
2 answers
58 views

How to handle .env.local in a next js typescript file?

import GithubProvider from "next-auth/providers/github" import GoogleProvider from "next-auth/providers/google" const GITHUB_ID: string = process.env.GITHUB_ID as string; const ...
Urten's user avatar
  • 23
1 vote
1 answer
119 views

vuejs3 and vite import.meta.env.VITE_BASE_URL not working

Hello I'm trying to get base url from .env file. And I'm getting undefined. I have tried some stack overflow answers and documentation but it didn't help. console.log('env', import.meta.env....
Dusan's user avatar
  • 111
1 vote
1 answer
68 views

PHP is not reading .env file

I am using PHP with PDO to connect to my database. I want to start using environment variables, so I used the following terminal command: composer require vlucas/phpdotenv My .env file now contains ...
John Beasley's user avatar
  • 2,853
1 vote
1 answer
32 views

env file not included in dist folder when building nwjs app using nw-builder-phoenix

I am using NW.js to create desktop app. In am using nwjs-builder-phoenix to build an executable file, I am experiencing an issue where the .env file is not being included in the OS-specific folders ...
Vivek sarvaiya's user avatar
-1 votes
1 answer
33 views

accessing .env file unseccessfully in node.js

I was working on a discord chatbot for some practice and try to access some environment variable in .env file. However , some how I was not able to access those variables with some following code: ...
AnKi ToYa's user avatar
1 vote
1 answer
59 views

Node.js can't read .env

package.json: "scripts": { "dev": "node --env-file=.env && tsx watch src/server.ts", The server.ts is the entry point of the app, and it works if I remove ...
Developer's user avatar
  • 107
0 votes
3 answers
87 views

php .env with Docker

To add phpdotenv, I am supposed to run the following terminal command: composer require vlucas/phpdotenv But I'm not exactly sure which folder I should be running the command. My folder structure ...
John Beasley's user avatar
  • 2,853

15 30 50 per page
1
2 3 4 5
14