Closed zevsdflkjiuxcvb closed 6 months ago
did you opt out of installing dependencies during "create-remix"? if not, a .env
file should have been generated for you during "remix init" with the contents of .env.example
https://github.com/remix-run/blues-stack/blob/main/remix.init/index.js#L63
if you do opt out, you should be seeing the following which prompts you to install your dependencies and run "npx remix init"
ah actually, re-read your issue, looks like the DB url the app has isn't correct (see undefined
)
undefined
Yeah I know, but why? I should be ran, right ?
what's weird is there is no subdomain before .db.nor...
so im not sure where the undefined is even coming from
It seems to come from db.server.ts file there is a conditional if (!isLocalHost) { } which sets the databaseurl for FLY_REGION which if you are not using and you are not localhost then it breaks.
I made a PR with a quick fix :P maybe not the best solution but hope it helps https://github.com/remix-run/blues-stack/pull/101
I just ran into the same issue. It's not fixed, is it?
@phifa if the issue is still open then most likely not. Check the pull request #101 and if it works for you, then comment there to validate it and get this fixed 👍
UPDATE:
~~Anyone find a solution for this? I'm running in to the same issue. I've altered my db.server file to something more generic:
import { PrismaClient } from "@prisma/client";
let db: PrismaClient;
declare global {
var db: PrismaClient | undefined;
}
// PrismaClient is attached to the `global` object in development to prevent
// exhausting your database connection limit.
if (process.env.NODE_ENV === "production") {
db = new PrismaClient();
db.$connect();
} else {
if (!global.db) {
global.db = new PrismaClient();
global.db.$connect();
}
db = global.db;
}
export default db;
Still doesn't work.~~
Fixed by #187
Have you experienced this bug with the latest version of the template?
yes
Steps to Reproduce
Run
npx create-remix --template remix-run/blues-stack
in console thennpm run dev
, I get this error Here is my db URL in .env file:DATABASE_URL="postgresql://postgres:norqgrhigqygxsywkasp@db.norqgrhigqygxsywkasp.supabase.co:5432/postgres"
Expected Behavior
Just hope plug and run :(
Actual Behavior