Skip to content

Conversation

@w3cj
Copy link
Contributor

@w3cj w3cj commented Dec 9, 2025

Encountered several issues when trying to create an app with the drizzle add-on.

  • Upgrade dependencies in frameworks/react-cra/add-ons/drizzle/package.json.ejs
    • drizzle-orm / drizzle-kit versions listed were over 1 year old (they have not reached v1 yet, so need to install latest minor version directly)
    • better-sqlite3 was 3 versions behind (resulting in node-gyp build error)
    • @types/mysql2 is not necessary
    • tsx is not necessary
  • Choosing drizzle / mysql during setup would result in a package.json JSON parse error, the changes provided here fix this Errors were encountered during the creation of your app error
  • Uses latest syntax in drizzle schema file (remove duplicate column names frameworks/react-cra/add-ons/drizzle/assets/src/db/schema.ts.ejs
  • Tries to load .env.local first before .env in frameworks/react-cra/add-ons/drizzle/assets/drizzle.config.ts.ejs
  • Update db connection file frameworks/react-cra/add-ons/drizzle/assets/src/db/index.ts.ejs
    • Remove dotenv config (tanstack start does this automatically)
    • Simplify creation
      • no need to directly create connection of each type
      • just pass in connection string to drizzle

@jherr jherr merged commit 945dfaf into TanStack:main Dec 12, 2025
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

Successfully merging this pull request may close these issues.

Drizzle SQLite Generator is broken

2 participants