bluecherrydvr / bluecherry-apps

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

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

Closed andrey-utkin closed 4 months ago

andrey-utkin commented 4 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().