lonelyplanet
lonelyplanet
Explore posts from servers
PPrisma
Created by lonelyplanet on 4/14/2025 in #help-and-questions
Generate command not working
Solved, it did not like my output folder
8 replies
PPrisma
Created by lonelyplanet on 4/14/2025 in #help-and-questions
Generate command not working
PS C:...\gitrepos\repo> pnpm prisma debug
Environment variables loaded from .env
-- Prisma schema --
Path: C:...\gitrepos\repo\prisma\schema.prisma

-- Local cache directory for engines files --
Path: C:...\gitrepos\repo\node_modules\.cache\prisma

-- Environment variables --
When not set, the line is dimmed and no value is displayed.
When set, the line is bold and the value is inside the `` backticks.

For general debugging
- CI:
- DEBUG: `*`
- NODE_ENV:
- RUST_LOG:
- RUST_BACKTRACE:
- NO_COLOR:
- TERM:
- NODE_TLS_REJECT_UNAUTHORIZED:
- NO_PROXY:
- http_proxy:
- HTTP_PROXY:
- https_proxy:
- HTTPS_PROXY:

For more information about Prisma environment variables:
See https://www.prisma.io/docs/reference/api-reference/environment-variables-reference

For hiding messages
- PRISMA_DISABLE_WARNINGS:
- PRISMA_HIDE_PREVIEW_FLAG_WARNINGS:
- PRISMA_HIDE_UPDATE_MESSAGE:

For downloading engines
- PRISMA_ENGINES_MIRROR:
- PRISMA_BINARIES_MIRROR (deprecated):
- PRISMA_ENGINES_CHECKSUM_IGNORE_MISSING:
- BINARY_DOWNLOAD_VERSION:

For configuring the Query Engine Type
- PRISMA_CLI_QUERY_ENGINE_TYPE:
- PRISMA_CLIENT_ENGINE_TYPE:

For custom engines
- PRISMA_QUERY_ENGINE_BINARY:
- PRISMA_QUERY_ENGINE_LIBRARY:
- PRISMA_SCHEMA_ENGINE_BINARY:
- PRISMA_MIGRATION_ENGINE_BINARY:

For the "postinstall" npm hook
- PRISMA_GENERATE_SKIP_AUTOINSTALL:
- PRISMA_SKIP_POSTINSTALL_GENERATE:
- PRISMA_GENERATE_IN_POSTINSTALL:

For "prisma generate"
- PRISMA_GENERATE_DATAPROXY:
- PRISMA_GENERATE_NO_ENGINE:

For Prisma Client
- PRISMA_SHOW_ALL_TRACES:
- PRISMA_CLIENT_NO_RETRY (Binary engine only):

For Prisma Migrate
- PRISMA_SCHEMA_DISABLE_ADVISORY_LOCK:
- PRISMA_MIGRATE_SKIP_GENERATE:
- PRISMA_MIGRATE_SKIP_SEED:

For Prisma Studio
- BROWSER:

-- Terminal is interactive? --
true

-- CI detected? --
false
PS C:...\gitrepos\repo> pnpm prisma debug
Environment variables loaded from .env
-- Prisma schema --
Path: C:...\gitrepos\repo\prisma\schema.prisma

-- Local cache directory for engines files --
Path: C:...\gitrepos\repo\node_modules\.cache\prisma

-- Environment variables --
When not set, the line is dimmed and no value is displayed.
When set, the line is bold and the value is inside the `` backticks.

For general debugging
- CI:
- DEBUG: `*`
- NODE_ENV:
- RUST_LOG:
- RUST_BACKTRACE:
- NO_COLOR:
- TERM:
- NODE_TLS_REJECT_UNAUTHORIZED:
- NO_PROXY:
- http_proxy:
- HTTP_PROXY:
- https_proxy:
- HTTPS_PROXY:

For more information about Prisma environment variables:
See https://www.prisma.io/docs/reference/api-reference/environment-variables-reference

For hiding messages
- PRISMA_DISABLE_WARNINGS:
- PRISMA_HIDE_PREVIEW_FLAG_WARNINGS:
- PRISMA_HIDE_UPDATE_MESSAGE:

For downloading engines
- PRISMA_ENGINES_MIRROR:
- PRISMA_BINARIES_MIRROR (deprecated):
- PRISMA_ENGINES_CHECKSUM_IGNORE_MISSING:
- BINARY_DOWNLOAD_VERSION:

For configuring the Query Engine Type
- PRISMA_CLI_QUERY_ENGINE_TYPE:
- PRISMA_CLIENT_ENGINE_TYPE:

For custom engines
- PRISMA_QUERY_ENGINE_BINARY:
- PRISMA_QUERY_ENGINE_LIBRARY:
- PRISMA_SCHEMA_ENGINE_BINARY:
- PRISMA_MIGRATION_ENGINE_BINARY:

For the "postinstall" npm hook
- PRISMA_GENERATE_SKIP_AUTOINSTALL:
- PRISMA_SKIP_POSTINSTALL_GENERATE:
- PRISMA_GENERATE_IN_POSTINSTALL:

For "prisma generate"
- PRISMA_GENERATE_DATAPROXY:
- PRISMA_GENERATE_NO_ENGINE:

For Prisma Client
- PRISMA_SHOW_ALL_TRACES:
- PRISMA_CLIENT_NO_RETRY (Binary engine only):

For Prisma Migrate
- PRISMA_SCHEMA_DISABLE_ADVISORY_LOCK:
- PRISMA_MIGRATE_SKIP_GENERATE:
- PRISMA_MIGRATE_SKIP_SEED:

For Prisma Studio
- BROWSER:

-- Terminal is interactive? --
true

-- CI detected? --
false
8 replies
BABetter Auth
Created by lonelyplanet on 3/28/2025 in #help
Betterauth CLI Fails on sqlite
yes
19 replies
BABetter Auth
Created by lonelyplanet on 3/28/2025 in #help
Betterauth CLI Fails on sqlite
Not bun.
19 replies
BABetter Auth
Created by lonelyplanet on 3/28/2025 in #help
Betterauth CLI Fails on sqlite
@bekacru what is the proper way to initalize a sqlite betterauth project and generate using the CLI and pnpm?
19 replies
BABetter Auth
Created by lonelyplanet on 3/28/2025 in #help
Betterauth CLI Fails on sqlite
And issue with similar issues is still open since december 2024, Surely by now this issue would of been documented or fixed: https://github.com/better-auth/better-auth/issues/892
19 replies
BABetter Auth
Created by lonelyplanet on 3/28/2025 in #help
Betterauth CLI Fails on sqlite
Is there a different way to start with sqlite than following the guide, if not can the docs be looked at
19 replies
BABetter Auth
Created by lonelyplanet on 3/28/2025 in #help
Betterauth CLI Fails on sqlite
Auth.ts
import { betterAuth } from "better-auth";
import Database from "better-sqlite3";

export const auth = betterAuth({
database: new Database("database.sqlite"),
});
import { betterAuth } from "better-auth";
import Database from "better-sqlite3";

export const auth = betterAuth({
database: new Database("database.sqlite"),
});
Installed better-auth,better-sqlite3 and @types/better-sqlite3
19 replies
BABetter Auth
Created by lukas on 3/24/2025 in #help
Dealing with session expiration in a React app
Care to share your code?
13 replies
BABetter Auth
Created by DragonCoder99 on 3/25/2025 in #help
Help with Seeding Existing Users into Better Auth
Your welcome again couldnt stress it enough https://orm.drizzle.team/docs/transactions, I promise you can save your self from failed half migrations
26 replies
BABetter Auth
Created by DragonCoder99 on 3/25/2025 in #help
Help with Seeding Existing Users into Better Auth
In that case use SQL or Drizzle and write a script to do it for you
26 replies
BABetter Auth
Created by DragonCoder99 on 3/25/2025 in #help
Help with Seeding Existing Users into Better Auth
Unless you have plaintext password then you can. I think the confussion can when you said seeding as this usally referrs to mockdata. You sound like you need to migrate user data
26 replies
BABetter Auth
Created by DragonCoder99 on 3/25/2025 in #help
Help with Seeding Existing Users into Better Auth
You cant since signUpEmail takes the plaintext password which since you have hashed passwords you can do it.
26 replies
BABetter Auth
Created by DragonCoder99 on 3/25/2025 in #help
Help with Seeding Existing Users into Better Auth
Are you using signUpEmail to migrate? you shouldn't instead use SQL directly or ORM and use db transactions
26 replies
BABetter Auth
Created by DragonCoder99 on 3/25/2025 in #help
Help with Seeding Existing Users into Better Auth
2. If the fields should not be updated by the user use input:false as in documentation and you dont have to add your extra fields to the adtionalfields column you could instead use hooks https://www.better-auth.com/docs/concepts/database#database-hooks to fill in those extra fields on signup like adminNotes you could leave it out and add a hook before hook that adds the adminNotes field to be like "User Signed up", If you need to update the adminNotes field use your ORM directly. 3. I dont recommend adding oldId as means more complexity use the single userId filed and migrate your current ids to strings if they are Ints and use the advanded option to either let the db generate Ids or add a custom id generate function
26 replies
BABetter Auth
Created by DragonCoder99 on 3/25/2025 in #help
Help with Seeding Existing Users into Better Auth
1. If your getting errors on the authclient read up about inferring addtional fields (Read the whole typescript page, is useful) if your have numbered ID's Interger than convert to string before migrating.
26 replies
BABetter Auth
Created by lukas on 3/24/2025 in #help
Dealing with session expiration in a React app
Shows an example of cleaning up the timeout aswell
13 replies
BABetter Auth
Created by lukas on 3/24/2025 in #help
Dealing with session expiration in a React app
See this hook from better-auth-tanstack it has when it expires it refetches ensure the session is constantly refreshes by betterauth
13 replies
BABetter Auth
Created by lukas on 3/24/2025 in #help
Dealing with session expiration in a React app
13 replies
BABetter Auth
Created by lukas on 3/24/2025 in #help
Dealing with session expiration in a React app
create a custom useSession hook that has a timeout that set to expiry time of session make sure you cleanup the timeout every render. In your hook you could have a sideeffect like onExpire and make it a funciton call the onExpire in the timeout
13 replies