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

Not working with nuxt #120

Open
Rednas83 opened this issue Nov 8, 2020 · 1 comment
Open

Not working with nuxt #120

Rednas83 opened this issue Nov 8, 2020 · 1 comment

Comments

@Rednas83
Copy link

Rednas83 commented Nov 8, 2020

Great work with this driver!

Also just tried it with nuxt, which can run nodejs on server level, but a few errors occured. This surprised me beacuse it was working fine with nodejs only.

  • Can't resolve 'net' in nodes7 => Resolved after adding net [yarn add net]
  • process.hrtime is not a function => Resolved after replacing with new Date()
  • net.connect is not a function => Looking closer at the added net package I think it's the wrong package.

image

Do you know what can be done to make this package compatible with nuxt?
https://nuxtjs.org/

Any help would be greatly appreciated

@Rednas83
Copy link
Author

Rednas83 commented Nov 9, 2020

I added a IsServer check before executing the call. Appearently the code was also running on the client. With nuxt this is not always verry clear because there is only middleware.
image

This is the response from the server I am getting now. I added some additional logging to make it more clear what is going on
image
And also the response in the client
image

It seems that during InitiateConnection undefined is returned while the callback is not called yet. Any idea how this can be fixed?
image

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