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

[🐛 Bug]: .env.production file not read when building #873

Open
1 task
simplenotezy opened this issue Sep 4, 2024 · 2 comments
Open
1 task

[🐛 Bug]: .env.production file not read when building #873

simplenotezy opened this issue Sep 4, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@simplenotezy
Copy link

simplenotezy commented Sep 4, 2024

next-on-pages environment related information

System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 23.1.0: Mon Oct 9 21:27:24 PDT 2023; root:xnu-10002.41.9~6/RELEASE_ARM64_T6000
CPU: (10) arm64 Apple M1 Pro
Memory: 32 GB
Shell: /bin/zsh
Package Manager Used: npm (10.2.4)

Relevant Packages:
@cloudflare/next-on-pages: 1.12.0
vercel: N/A
next: N/A

Description

When you run npm run pages:deploy it reads .env.development instead of .env.production

Reproduction

No response

Pages Deployment Method

Direct Upload (wrangler pages publish or the @cloudflare/pages-action GitHub Action)

Pages Deployment ID

11a54ff7-36d2-4cf7-b8ab-543510e32449

Additional Information

No response

Would you like to help?

  • Would you like to help fixing this bug?
@simplenotezy simplenotezy added the bug Something isn't working label Sep 4, 2024
@simplenotezy
Copy link
Author

I changed setup to use wrangler.toml file and instead define my environment variables there

@mayocream
Copy link

mayocream commented Sep 19, 2024

Hi, I encountered the same issue: .env does not get processed in the Cloudflare functions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants