bluecherrydvr / bluecherry-apps

Bluecherry surveillance system (server application)
http://www.bluecherrydvr.com
GNU General Public License v2.0
217 stars 68 forks source link

www/ajax/discoverCameras.php: set NODE_PATH for js tool cmd #665

Closed andrey-utkin closed 8 months ago

andrey-utkin commented 9 months ago

In bluecherry-node-onvif package, we bundle the dependencies necessary to avoid relying on packaging of all of them the Debian way.

The command "node .../discovery_json/node-onvif.js" doesn't work as it doesn't look for node_modules where we put them, /usr/share/nodejs/onvif/node_modules .

This change passes NODE_PATH env var to node interpreter command, which is handled as expected by PHP's popen().