GithubHelp home page GithubHelp logo

turso-extended / api-mug-store-api Goto Github PK

View Code? Open in Web Editor NEW
16.0 4.0 2.0 177 KB

A distributed REST API build with Turso using the Drizzle ORM hosted on Cloudflare workers

Home Page: https://the-mugs-store-api.infra-43f.workers.dev

License: MIT License

JavaScript 1.39% TypeScript 98.61%
cloudflare drizzle turso workers

api-mug-store-api's Issues

The `npm run seed` command fails

penberg@vonneumann api-turso-cf-workers % npm run seed


> [email protected] seed
> tsx drizzle/seed

/Users/penberg/src/tursodatabase/api-turso-cf-workers/node_modules/@libsql/client/lib-cjs/hrana.js:287
        return new api_js_1.LibsqlError(e.message, code, e);
               ^

LibsqlError: SQLITE_UNKNOWN: SQLite error: no such table: categories
    at null.mapHranaError (/Users/penberg/src/tursodatabase/api-turso-cf-workers/node_modules/@libsql/client/lib-cjs/hrana.js:287:16)
    at HttpClient.execute (/Users/penberg/src/tursodatabase/api-turso-cf-workers/node_modules/@libsql/client/lib-cjs/http.js:84:34)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at PreparedQuery.all (/Users/penberg/src/tursodatabase/api-turso-cf-workers/node_modules/src/libsql/session.ts:223:16)
    at null.seed (/Users/penberg/src/tursodatabase/api-turso-cf-workers/drizzle/seed.ts:23:33) {
  code: 'SQLITE_UNKNOWN',
  [cause]: [ResponseError: SQLite error: no such table: categories] {
    code: 'SQLITE_UNKNOWN',
    proto: {
      message: 'SQLite error: no such table: categories',
      code: 'SQLITE_UNKNOWN'
    }
  }
}

Schema generation fails

penberg@vonneumann api-turso-cf-workers % npm run generate

> [email protected] generate
> npx drizzle-kit generate:sqlite --out ./drizzle/migrations --breakpoints --schema=./drizzle/schema.ts

drizzle-kit: v0.18.1
drizzle-orm: v0.26.5

TypeError: e.is is not a function
    at mapColumnToSchema (/Users/penberg/src/tursodatabase/api-turso-cf-workers/node_modules/src/index.ts:273:4)
    at null.<anonymous> (/Users/penberg/src/tursodatabase/api-turso-cf-workers/node_modules/src/index.ts:185:17)
    at Array.map (<anonymous>)
    at null.exports.createInsertSchema (/Users/penberg/src/tursodatabase/api-turso-cf-workers/node_modules/src/index.ts:184:55)
    at Object.<anonymous> (/Users/penberg/src/tursodatabase/api-turso-cf-workers/drizzle/schema.ts:22:37)
    at Module._compile (node:internal/modules/cjs/loader:1103:14)
    at Module._compile (/Users/penberg/src/tursodatabase/api-turso-cf-workers/node_modules/drizzle-kit/index.js:16334:30)
    at Module._extensions..js (node:internal/modules/cjs/loader:1157:10)
    at Object.newLoader [as .ts] (/Users/penberg/src/tursodatabase/api-turso-cf-workers/node_modules/drizzle-kit/index.js:16338:13)
    at Module.load (node:internal/modules/cjs/loader:981:32)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.