Tahul / nuxt-edgedb

💽 Nuxt 3 integration for EdgeDB
71 stars 7 forks source link

#edgedb/queries not recognized. #27

Closed ivanparramartinez closed 5 months ago

ivanparramartinez commented 5 months ago

When running the Nuxt project, there is an issue with a warning:

"#edgedb/queries" is imported by "node_modules/.pnpm/nuxt-edgedb-module@0.0.46_rollup@4.18.0/node_modules/nuxt-edgedb-module/dist/runtime/server/composables/useEdgeDbQueries.mjs", but could not be resolved – treating it as an external dependency.

I don't know if this affect the behaviour of the app. But there is no further information on the internet and I don't know how to solve it, since in the docs there is no information about it. Captura de pantalla 2024-05-29 a la(s) 9 43 31 p  m

this is my package.json

{
  "name": "nuxt-app",
  "private": true,
  "type": "module",
  "scripts": {
    "build": "nuxt build",
    "dev": "nuxt dev",
    "generate": "nuxt generate",
    "preview": "nuxt preview",
    "postinstall": "nuxt prepare"
  },
  "dependencies": {
    "edgedb": "^1.5.7",
    "nuxt": "^3.11.2",
    "vue": "^3.4.27",
    "vue-router": "^4.3.2"
  },
  "devDependencies": {
    "@edgedb/generate": "^0.5.3",
    "@nuxtjs/vuetify": "^1.12.3",
    "nuxt-edgedb-module": "^0.0.46"
  }
}
Tahul commented 5 months ago

hey there!

I'm not sure about where is located your query builder, have you built it already?

It seems like it fails to build it, do you have a dbschema directory? Is your EdgeDB instance initialized?

As a short-term workaround, I do have these commands in my package.json to build my custom setup query builder:

    "db:generate:client": "npx @edgedb/generate edgeql-js --output-dir ./server/dbschema/query-builder --force-overwrite --target=ts",
    "db:generate:interfaces": "npx @edgedb/generate interfaces --file ./server/dbschema/interfaces.ts --force-overwrite",
    "db:generate:queries": "npx @edgedb/generate queries --file ./server/dbschema/queries --target=ts --force-overwrite",
    "db:generate": "pnpm db:generate:interfaces && pnpm db:generate:queries && pnpm db:generate:client",
    "db:reset": "edgedb instance destroy -I my_instance --force && edgedb project init",
ivanparramartinez commented 5 months ago

Hi, no I haven't built any query builder. Just installing edgedb that errors shows up. Yes I have an schema directory and the edgedb instance initialized.

Just running npm run dev that errors shows up. This is the app directory tree. The query-builder folder just created itself.

Captura de pantalla 2024-05-30 a la(s) 6 10 00 p  m

watzon commented 2 months ago

@ivanparramartinez I am having the same issue here where nothing is being auto generated. How did you solve the issue?