Wednesday, 15 March 2017

Uncaught TypeError: exists is not a function. Integrating C library into Node JS

I am integrating a C library into a chrome app codebase that uses Node JS. I am using node-ffi for integration. But, I am getting this weird error when I am trying to launch my application. The corresponding code below is what throws the error and it is in bindings.js which is part of node-bindings git repository.

, exists = ((fs.accessSync && function (path) { try { fs.accessSync(path); } catch (e) { return false; } return true; }) || fs.existsSync || path.existsSync)

However removing my ffi integration changes, runs the chrome app well. Could someone please help me with this issue?



via rakeshgn

No comments:

Post a Comment