Ubuntu: Module "lodash" could not be found

Hey everyone, giving up on trying to solve this one.

I have a Ubuntu server (not windows), and when trying to run a V8JS script and including lodash.min.js I am given this error: “The module ‘lodash’ could not be found in any known locations.”

Any ideas for what to do with this error in a Ubuntu instance?

Server: Ubuntu
DreamFactory: 2.0.1

//from Dreamfactory.log
production.DEBUG: * no “require()” support in V8 library v3.14.5.9

the same issue in debian jessie

local.DEBUG: * no “require()” support in V8 library v3.14.5.8

Admin Application Version: 2.1.3
DreamFactory Version: 2.1.0

when use the v8js post script sample

Regards

V8JS libraries are not prepackaged with DreamFactory. It is an add-on that you can install. These commands are what I use to get V8 on my setup (albeit old versions):

sudo apt-get install libv8-dev g++ cpp php5-dev
sudo pecl install v8js-0.1.3

sudo vi /etc/php5/mods-available/v8js.ini
Insert:
extension=v8js.so

sudo php5enmod v8js

//If apache.
sudo service apache2 restart

//If nginx
sudo service php5-fpm stop
sudo service nginx stop
sudo service php5-fpm start
sudo service nginx start

Good luck!

Thanks, sridharsa.

I thought I had done these steps but went through them once more to verify. v8js was enabled and installed, but I’m still receiving * no “require()” support in V8 library v3.14.5.9 in the logs (with no evidence of the v8js script firing).

same , for my v8js was enabled and installed and detected

but I’m still receiving * no “require()”

Hey everybody. In order to use require() you have to install version 0.3 or higher of v8js.

OKAY this is very helpful! Thanks to Drew’s point, I went out and attempted to install version 0.3+ of v8js.

Unfortunately, using pecl install on Ubuntu to install anything later than 0.1.3 results in an error message saying a newer version of libv8 needs to be installed. I struggled for a bit until I came upon this post:

http://elvis.eti.br/2016/01/27/installing-v8-javascript-engine-and-v8js-pecl-extension-on-ubuntu-14/

Now the v8js error has gone away. Just a warning… the step “make native library=shared” took about 45 minutes for my Ubuntu server to compile.

EDIT: Don’t forget “sudo php5enmod v8js”

Hey,
Drew (Thank you!) wrote a detailed step by step process to compile and use the last supported version (0.4.1) for our PHP (v5.5) version. You can find that here: https://wiki.dreamfactory.com/DreamFactory/Installation/Modules/v8js

We will be migrating to PHP7 soon and then we can move to the latest V8JS (v1.1).