gQuery icon indicating copy to clipboard operation
gQuery copied to clipboard

codegen missing in version 0.5.0

Open inta opened this issue 2 years ago • 7 comments

With version 0.5.0 from npm I get the following error on npm run dev or npm run build:

error when starting dev server:
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './codegen' is not defined by "exports" in <project-dir>/node_modules/@leveluptuts/g-query/package.json imported from <project-dir>/vite.config.js.timestamp-1659433708313.mjs
    at new NodeError (node:internal/errors:387:5)
    at throwExportsNotFound (node:internal/modules/esm/resolve:439:9)
    at packageExportsResolve (node:internal/modules/esm/resolve:718:3)
    at packageResolve (node:internal/modules/esm/resolve:892:14)
    at moduleResolve (node:internal/modules/esm/resolve:958:20)
    at defaultResolve (node:internal/modules/esm/resolve:1173:11)
    at nextResolve (node:internal/modules/esm/loader:173:28)
    at ESMLoader.resolve (node:internal/modules/esm/loader:852:30)
    at ESMLoader.getModuleJob (node:internal/modules/esm/loader:439:18)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:76:40)

Version 0.2.3 was working fine. Is there anything wrong with the new release or are configuration changes required to make it work?

inta avatar Aug 02 '22 09:08 inta

I second this....neither is vite:{} allowed. config.kit.vite has been removed — use vite.config.js instead

bitnosis avatar Aug 18 '22 23:08 bitnosis

@bitnosis sure, but that config part can be moved manually to vite.config.js

@stolinski maybe this is a problem with npm and it works with pnpm?

inta avatar Aug 19 '22 13:08 inta

@inta you found a solution for this?, I try with yarn and pnmp

JhordyVlas avatar Sep 23 '22 02:09 JhordyVlas

No, I'm still on version 0.2.3 and thinking about how I can go on with GraphQL on SvelteKit.

inta avatar Sep 23 '22 11:09 inta

Take a look at this client: GraphQL Zeus, generates a typed client from your schema, it works for me. Good Luck!

JhordyVlas avatar Sep 23 '22 20:09 JhordyVlas

Thanks, I'll have a look and see how it can work together with Hasura (that's what I use as backend for GraphQL).

inta avatar Sep 25 '22 07:09 inta

Still seems to be a problem... ... Package subpath './codegen' is not defined by "exports" ... was using npm.

Neue-Raeumlichkeit avatar Nov 29 '22 17:11 Neue-Raeumlichkeit