Comments (1)
I ran into the same issue (I probably did the same thing you did), and after poking around a bit I think I may know what the problem is.
The PlanetScale Prisma adapter is an preview feature, and needs to be enabled thusly in the schema.prisma
file. This is by default in the repo when you initially create it (when you run npx create-t3-app@latest
, you get a schema.prisma
file that looks like this)
// This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema
generator client {
provider = "prisma-client-js"
previewFeatures = ["driverAdapters"] // this line is what enables the prisma adapters, see https://github.com/prisma/prisma/discussions/21347
}
datasource db {
provider = "mysql"
url = env("DATABASE_URL")
// If you have enabled foreign key constraints for your database, remove this line.
relationMode = "prisma"
}
model Post {
id Int @id @default(autoincrement())
name String
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
@@index([name])
}
But, when you go to set up a planetscale DB in the planetscale app, they give you a schema.prisma
file to copy into your repo when you initialize your DB, and the schema.prisma file they give you looks like this:
// This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema
datasource db {
provider = "mysql"
url = env("DATABASE_URL")
relationMode = "prisma"
}
generator client {
provider = "prisma-client-js"
}
model Post {
id Int @id @default(autoincrement())
name String
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
@@index([name])
}
If the PlanetScale driver adapter isn't enabled, then npm i
for those adapter features will fail.
So, the problem here is that the planetscale docs don't include the planetscale driver features by default, and my guess is you copied them over and the install failed (I did the same thing initially!)
If you include the
previewFeatures = ["driverAdapters"]
in the schema.prisma
file, the install should work great. Hope this helps!
from create-t3-app.
Related Issues (20)
- bug: Example query failing on new projects. Zod validation failing, input is undefined HOT 3
- feat: Create CLI option for using Next App Router
- bug: timestamps are not stored as UTC when using drizzle and postgres HOT 1
- feat: CLI Option for Postgres HOT 3
- feat: add option to keep default Import alias of create-next-app HOT 2
- bug: Infinite loop when using useQuery or useSuspenseQuery
- feat: Add shadcn as a cli option HOT 4
- Add autoprefixer HOT 1
- bug: next-auth v5 environment variables HOT 2
- bug: Drizzle Studio requires a new version of Drizzle Kit to run locally HOT 1
- feat: NextAuth documentation update for app router HOT 4
- bug: drizzle push command in package.json deprecated in drizzle-kit version 0.21.0
- bug: db:push script deprecation error w/ drizzle-kit
- feat: Use executing package manager to install dependencies HOT 4
- docs: some of the redirect links in usage > tRPC page not working. HOT 2
- bug: t3 App not building App Router Application HOT 2
- feat: Stale T3 Folder Structure in docs HOT 5
- bug: Setting import-alias via the command line fails.
- feat: Add .idea folder to .gitignore file so that it will not be accidentally committed to the git repo
- bug: create-T3 app with drizzle missing default id value for users table on new user HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from create-t3-app.