Gomah / nuxt-graphql-request

Easy Minimal GraphQL client integration with Nuxt.js.
https://nuxt-graphql-request.vercel.app
MIT License
194 stars 16 forks source link

Nuxt bridge compatibility #36

Closed nonlinearcom closed 1 year ago

nonlinearcom commented 2 years ago

Hi, I guess this module in not compatible with the new nuxt/bridge? In dev everything is working well, but in production I get this error:

> node .output/server/index.mjs
Listening on http://localhost:3000

Cannot find package '....path/.output/server/node_modules/ramda/' imported from /....path/.output/server/chunks/app/server.mjs
  at new NodeError (internal/errors.js:322:7)  
  at legacyMainResolve (internal/modules/esm/resolve.js:245:9)  
  at packageResolve (internal/modules/esm/resolve.js:680:14)  
  at moduleResolve (internal/modules/esm/resolve.js:728:18)  
  at Loader.defaultResolve [as _resolve] (internal/modules/esm/resolve.js:842:11)  
  at Loader.resolve (internal/modules/esm/loader.js:89:40)  
  at Loader.getModuleJob (internal/modules/esm/loader.js:242:28)  
  at ModuleWrap.<anonymous> (internal/modules/esm/module_job.js:76:40)  
  at link (internal/modules/esm/module_job.js:75:36)

Does anyone know a workaround for this? 🤔 Thanks!

Gomah commented 2 years ago

Hey @nonlinearcom,

Pretty busy right now but will have a look whenever I can!

gustawdaniel commented 2 years ago

How about nuxt3 compatibility? We have release conadidate.

scottyzen commented 2 years ago

@gustawdaniel This might help you in the meantime https://github.com/diizzayy/nuxt-graphql-client

drewbaker commented 1 year ago

@Gomah we are getting ready to move our fuxt boilerplate over to Nuxt3. Obviously this is a big part of that. Do you have any thoughts on how you'd like this to work with Nuxt3? The reason I ask is we could start work on a PR for you, but I want to make sure we are going in the direction you want.

IMHO nuxt-graphql-client is pretty heavy handed the way it imports GQL as functions, and the token API is opinionated. I think there is room for nuxt-graphql-request as a lightweight basic GQL client, that is just "normal" without trying to be cute.

nonlinearcom commented 1 year ago

Hi @drewbaker, same situation here, did you find any alternative? :)

drewbaker commented 1 year ago

@nonlinearcom Not yet, but I do have a bounty for someone to make one! https://github.com/Gomah/nuxt-graphql-request/issues/52

But eventually I will have to make one, can't wait much longer.

nonlinearcom commented 1 year ago

Closing this since Nuxt3 is supported now :) Thanks @drewbaker & @nicktrn !