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

Not picking up env variable #395

Open
songz opened this issue Oct 19, 2021 · 1 comment
Open

Not picking up env variable #395

songz opened this issue Oct 19, 2021 · 1 comment

Comments

@songz
Copy link
Collaborator

songz commented Oct 19, 2021

Describe the bug
When I've setup an env variable for ADMIN in ~/.bashrc as root, then source ~/.bashrc, I verified that my env ADMIN variable exists by typing echo $ADMIN. But when I run npm run server, I get the error that says, 'please set ADMIN env variable`.

To Reproduce
Steps to reproduce the behavior:

  1. Get fresh server from digital ocean.
  2. vim ~/.bashrc
  3. Add ADMIN=....
  4. Load your env variables by doing source ~/.bashrc
  5. Install myproxy, run server without ADMIN env variable. You will get error.

Expected behavior
I expect the environment variable to get picked up. and not throw the error.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

@ggwadera
Copy link
Collaborator

Because the app runs with pm2, I guess pm2 doesn't read environment variables you may have sourced in the current shell session. Not sure though.

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

No branches or pull requests

2 participants