Skip to content

Install needs to add @edgedb/generate #33

@paulschwenn

Description

@paulschwenn

To get the nuxt-edgedb module CLI setup wizard to run with npx nuxt-edgedb-module or pnpm exec nuxt-edgedb-module I had to manually install the EdgeDB Generators package @edgedb/generate to dev dependencies with:

pnpm add -D @edgedb/generate.

Using:

  • nuxt-edgedb-module 0.0.52
  • EdgeDB 5.6
  • Nuxt 3.12.4

In case others have a similar issue perhaps the README.md should be updated.

Here is what is required for me to to get pnpm exec nuxt-edgedb-module to work from a clean project.

  • Create a new Nuxt project pnpm dlx nuxi@latest init new_project_name
  • cd new_poject_name
  • Add database driver: pnpm add --save-prod edgedb
  • Add EdgeDB generators package: pnpm add --save-dev @edgedb/generate Otherwise pnpm exec nuxt-edgedb-module will fail.
  • Add this nuxt-edgedb-module module to the Nuxt project: npx nuxi@latest module add edgedb
  • Create a schema in dbschema/default.esdl and API endpoint e.g. server/api/movies/[id].ts after seeding some data.
  • edgedb migration create
  • edgedb migrate
  • Seed some data See the EdgeDB TypeScript docs.
  • Create a query file e.g. dbschema/queries/movie.ts
  • Run the module pnpm exec nuxt-edgedb-module
  • Start nuxt npm run dev and the api should be available at the API endpoint

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions