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

Using Better-Auth CLI with Encore #1701

Open
Maraket opened this issue Jan 11, 2025 · 0 comments
Open

Using Better-Auth CLI with Encore #1701

Maraket opened this issue Jan 11, 2025 · 0 comments

Comments

@Maraket
Copy link

Maraket commented Jan 11, 2025

Issue

When attempting to run pnpx @better-auth/cli generate I get the error:

2025-01-11T09:26:32.971Z ERROR [Better Auth]: Couldn't read your auth config. Error: The ENCORE_RUNTIME_LIB environment variable is not set. It must be set to the path of the Encore runtime library ('encore-runtime.node').

Current Investigation

After finding #1611, I understand I can't simply add the env variable to solve the issue.

I found I can do the schema manually, as per https://better-auth.vercel.app/docs/concepts/database#core-schema, though this both bypasses the issue, and wouldn't resolve the issue if I opted to use the migrate command for better-auth

Expectation

Potentially a way to run commands in context to the running encore application.

Currently my stack

System

  • Node Version: 20.18.0
  • Encore Version: 1.45.6
  • OS: MacOS 14.2.1
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

1 participant