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

Set the "JWT_SECRET" environment variable #4

Closed
tbenst opened this issue Feb 16, 2020 · 2 comments
Closed

Set the "JWT_SECRET" environment variable #4

tbenst opened this issue Feb 16, 2020 · 2 comments

Comments

@tbenst
Copy link

tbenst commented Feb 16, 2020

Hitting this error:

> export JWT_SECRET="some secret value"
> yesod devel
Success! Waiting for next file change.
Type help for available commands. Press enter to force a rebuild.
Starting devel application
devel.hs: Set the "JWT_SECRET" environment variable
Unexpected: child process exited with ExitFailure 1

If relevant, I did slightly modify the stack.yaml for use with Nix:

resolver: lts-14.25
packages:
- .
extra-deps:
- esqueleto-2.6.0
- jwt-0.9.0

install-ghc: false
system-ghc: true

nix:
  enable: true
  packages: [glpk, pcre, zlib]
@tzemanovic
Copy link
Owner

I think this is indeed caused by nix as it runs in a pure environment. You can either ask it to run in non-pure environment (add pure: false in stack.yaml, or run with --no-nix-pure), or set the variable via a custom shell.nix file. Please check out the nix integration docs for stack.

@tbenst
Copy link
Author

tbenst commented Feb 19, 2020

Thanks!

@tbenst tbenst closed this as completed Feb 19, 2020
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