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

Exception thrown after connect #5

Open
giri-v opened this issue Dec 31, 2017 · 1 comment
Open

Exception thrown after connect #5

giri-v opened this issue Dec 31, 2017 · 1 comment

Comments

@giri-v
Copy link

giri-v commented Dec 31, 2017

I get an exception thrown like this immediately after the 'connect' event fires.

Debugger listening on [::]:5858
events.js:160
throw er; // Unhandled 'error' event
^

ReferenceError: self is not defined
at C:\Users\fg89nn\Documents\Visual Studio 2015\Projects\CamLogger\CamLogger
\node_modules\node-hikvision-api\hikvision.js:70:10
at Parser. (C:\Users\fg89nn\Documents\Visual Studio 2015\Projects
\CamLogger\CamLogger\node_modules\xml2js\lib\parser.js:303:18)
at emitOne (events.js:96:13)
at Parser.emit (events.js:188:7)
at Object.onclosetag (C:\Users\fg89nn\Documents\Visual Studio 2015\Projects
CamLogger\CamLogger\node_modules\xml2js\lib\parser.js:261:26)
at emit (C:\Users\fg89nn\Documents\Visual Studio 2015\Projects\CamLogger\Cam
Logger\node_modules\sax\lib\sax.js:624:35)
at emitNode (C:\Users\fg89nn\Documents\Visual Studio 2015\Projects\CamLogger
\CamLogger\node_modules\sax\lib\sax.js:629:5)
at closeTag (C:\Users\fg89nn\Documents\Visual Studio 2015\Projects\CamLogger
\CamLogger\node_modules\sax\lib\sax.js:889:7)
at Object.write (C:\Users\fg89nn\Documents\Visual Studio 2015\Projects\CamLo
gger\CamLogger\node_modules\sax\lib\sax.js:1436:13)
at Parser.exports.Parser.Parser.parseString (C:\Users\fg89nn\Documents\Visua
l Studio 2015\Projects\CamLogger\CamLogger\node_modules\xml2js\lib\parser.js:322
:31)
Press any key to continue...

Can't seem to figure our where self is defined...

Thanks

@markdegrootnl
Copy link

markdegrootnl commented Apr 30, 2018

The NPM version of this module is outdated. You can install the latest version where this issue is fixed:
npm install https://github.com/nayrnet/node-hikvision-api.git --save

Also you'll want to install the missing request dependency (see #6):
npm install request

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

2 participants