Installing dependencies
sudo apt-get install build-essential clang libdbus-1-dev libgtk2.0-dev \
libnotify-dev libgnome-keyring-dev libgconf2-dev \
libasound2-dev libcap-dev libcups2-dev libxtst-dev \
gcc-multilib g++-multilib \
libgtk2.0-0 libgconf-2-4 \
libasound2 libxtst6 libxss1 libnss3 xvfb \
Download nvm
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh | bash
After install nvm, install a node version. For example:
nvm install v5.5.0
Close your terminal and open again.
In project folder run command
npm install electron-prebuilt@0.37.7 --save
Add electronPath parameter
var nightmare = Nightmare({
electronPath: require('electron-prebuilt')
});
xvfb-run -a node --harmony <your-script>
DEBUG=nightmare:*,electron:* xvfb-run -a node --harmony <your-script>
OR
DEBUG=nightmare:*,electron:* node --harmony <your-script>
Check if there is not installed library. If you can not find the problem please visit this link