plcpeople / nodeS7

Node.JS library for communication to Siemens S7 PLCs
MIT License
356 stars 120 forks source link

Not working with nuxt #120

Open Rednas83 opened 3 years ago

Rednas83 commented 3 years ago

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.

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 commented 3 years ago

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