Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install needs to add @edgedb/generate #33

Open
paulschwenn opened this issue Aug 20, 2024 · 0 comments
Open

Install needs to add @edgedb/generate #33

paulschwenn opened this issue Aug 20, 2024 · 0 comments

Comments

@paulschwenn
Copy link

paulschwenn commented Aug 20, 2024

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
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

No branches or pull requests

1 participant