msvargas / node-logix

Node.js package to read/write data from Allen Bradley Compact/Control Logix PLC's
MIT License
13 stars 3 forks source link

PLC is not a constructor #2

Closed AlonsoGuerrero closed 5 years ago

AlonsoGuerrero commented 5 years ago

When I try to run the Example with events, read and write tags the console prints TypeError: PLC is not a constructor

msvargas commented 5 years ago

Hi, sorry its my mistake, you should import using 'default': Eg:

const PLC = require("node-logix").default;
....

Check others examples: https://github.com/punisher97/node-logix/blob/master/examples/01_write_read_simple.js