Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dotenv files ignored when deploying nextjs apps #8076

Open
CHAKlBDEV opened this issue Dec 20, 2024 · 0 comments
Open

dotenv files ignored when deploying nextjs apps #8076

CHAKlBDEV opened this issue Dec 20, 2024 · 0 comments

Comments

@CHAKlBDEV
Copy link

CHAKlBDEV commented Dec 20, 2024

[REQUIRED] Environment info

firebase-tools: 13.29.1

Platform: Windows

[REQUIRED] Test case

Nextjs project with .env.* files

[REQUIRED] Steps to reproduce

  1. Create new nextjs project
  2. Create .env.production file
  3. Set up firebase
  4. Create "production" alias
  5. Deploy

[REQUIRED] Expected behavior

Expected firebase-tools to pick up .env.production

[REQUIRED] Actual behavior

.env.production is not picked up

Problem

Here we're supposed to find all environment variable files. The issue is that glob doesn't support backslashes. They're instead used for escaping something or another and node's path.join (in getProjectPath) does return paths with backslashes.

Potential solution

Replace all backslashes with forwards

const getProjectPath = (...args: string[]) => join(projectRoot, source, ...args).replaceAll("\\","/");

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants