Error when starting for the first time
I get this error when I run pnpm dev and go to http://localhost:3000:
Import trace for requested module:
app:dev: ../../node_modules/.pnpm/[email protected]/node_modules/picocolors/picocolors.js
app:dev: ../../node_modules/.pnpm/[email protected][email protected]_@[email protected]_@[email protected]__@[email protected][email protected]_/node_modules/tailwindcss/lib/featureFlags.js
app:dev: ../../node_modules/.pnpm/[email protected][email protected]_@[email protected]_@[email protected]__@[email protected][email protected]_/node_modules/tailwindcss/lib/util/getAllConfigs.js
app:dev: ../../node_modules/.pnpm/[email protected][email protected]_@[email protected]_@[email protected]__@[email protected][email protected]_/node_modules/tailwindcss/lib/public/resolve-config.js
app:dev: ../../node_modules/.pnpm/[email protected][email protected]_@[email protected]_@[email protected]__@[email protected][email protected]_/node_modules/tailwindcss/resolveConfig.js
app:dev: ../../packages/tailwind-config/index.ts
app:dev: ../../packages/auth/provider.tsx
app:dev: ⨯ next/dist/src/lib/is-error.ts (60:10) @ getProperError
app:dev: ⨯ Error: [object Object]
app:dev: at AsyncLocalStorage.run (node:async_hooks:346:14)
app:dev: digest: "4014698488"
app:dev: 58 | }
app:dev: 59 |
app:dev: > 60 | return new Error(isPlainObject(err) ? safeStringify(err) : err + '')
app:dev: | ^
app:dev: 61 | }
app:dev: 62 |
app:dev: GET / 500 in 82466ms
next-forge version I am using version 2.3.10
To Reproduce Follow the setup instructions. Add environment variables
Screenshots
Desktop (please complete the following information):
- OS: MacOS
- Browser: Chrome
I believe it might be due to one of the environment variables (I have created accounts on each provider) but I can't find which one is causing the error?
Thanks!
@PierrickLozach I believe I saw this error myself stemming from Prisma when the DATABASE_URL was invalid (or at least, couldn't access the database). Can you double check this field for me in apps/app/.env.local?
Also experiencing this. DATABASE_URL is set, I can also open prisma studio and add new rows in the DB.
Are you using neon as a database? By default the project is using neon.
By default, next-forge uses [Neon](https://neon.tech/) as its database provider and [Prisma](https://prisma.io/) as its ORM. However, you can easily switch to other providers if you’d prefer,
I was getting this error, but because I wasn't using neon but a postgres database from railway.
To solve this I changed the way the connection is made.
Great point. @PierrickLozach what database provider are you using?
This fixed my issue! Thanks!
To solve this I changed the way the connection is made.
What changes did you make to the way your connection is made? I'm using a standard postgres URL like: postgres://postgres:[email protected]:5432/postgres but I'm getting this error still.
@danhstevens I haven’t tested, but you may have to remove the neon serverless adapter from the database package.
I just spun up a neon database and that took care of the issue.
What changes did you make to the way your connection is made? I'm using a standard postgres URL like:
Just it:
env: DATABASE_URL="postgres://postgres:[email protected]:5432/postgres"
// packages > database > index.ts
import 'server-only';
import { PrismaClient } from '@prisma/client';
declare global {
var cachedPrisma: PrismaClient | undefined;
}
export const database = new PrismaClient();
Sorry about the delay. Did not receive notifications. The issue seems to be fixed on my side. I am using an AWS postgresql DB.