-
Notifications
You must be signed in to change notification settings - Fork 2k
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
create-payload-app in existing Next.js project replaces .env and .env.example contents #10355
Comments
Screen.Recording.2025-01-15.at.4.02.49.PM.movHi @smoores-dev, I used the reproduction you provided and am unable to replicate this behavior. Could you send a screenshot? There might be something I am missing in your steps. |
Hi @JessChowdhury! It looks like you're running |
|
@smoores-dev thank you I see the issue now! |
Describe the Bug
On the tin! I had a .env file with several variables in it; after running
npx create-payload-app
, the entire contents were replaced with:Link to the code that reproduces this issue
https://github.com/smoores-dev/payload-dotenv-clear-repro
Reproduction Steps
You can just see the issue by looking at the .env.example file between the two commits in that repo. To reproduce:
git checkout init
to check out the initial commit.env
file and put an environment variable in itnpx create-payload-app
(choose whatever options)Which area(s) are affected? (Select all that apply)
Not sure
Environment Info
The text was updated successfully, but these errors were encountered: