If Running nightmare headless browser in server without desktop => need to install a virtual one: xvfb sudo apt-get install -y xvfb Then run the app like: xvfb-run node --harmony hello_nightmare.js