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

NEXT_PUBLIC_VERCEL_ENV="development" in .env not respected when npm run start #1414

Open
6 of 10 tasks
yhyu13 opened this issue Dec 5, 2023 · 0 comments
Open
6 of 10 tasks
Labels
bug Something isn't working

Comments

@yhyu13
Copy link

yhyu13 commented Dec 5, 2023

Please check that this issue hasn't been reported before.

  • I searched previous Bug Reports didn't find any similar reports.

Expected Behavior

I essentially want to login as local auth even when npm run start, (because dev no opt the frontend web page is just way toooo slow!)

While in .env

# Deployment Environment:
NODE_ENV="development"
NEXT_PUBLIC_VERCEL_ENV="${NODE_ENV}"

with npm run dev, all is fine

But when running with npm run start, NEXT_PUBLIC_VERCEL_ENV switched to production, not respecting what .env tells it to be!

I have to manually modify code to make local auth work with optimized front end code

https://github.com/yhyu13/AgentGPT/blob/710a46d98205069bce867633b7c9a489c54fcc6d/next/src/server/auth/index.ts#L65

Current behaviour

v1.0.0 release commit

Steps to reproduce

running with npm run build && npm run start instead of npm run dev

Possible solution

No response

Which Operating Systems are you using?

  • Android
  • iPhone/iPad
  • Linux
  • macOS
  • Windows

Acknowledgements

  • My issue title is concise, descriptive, and in title casing.
  • I have searched the existing issues to make sure this bug has not been reported yet.
  • I am using the latest version of AgentGPT.
  • I have provided enough information for the maintainers to reproduce and diagnose the issue.
@yhyu13 yhyu13 added the bug Something isn't working label Dec 5, 2023
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

1 participant