Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upDeploy Nightmare js to Heroku #1600
Comments
|
I have the same problem, but I'm not getting an error similar to yours, I'm getting a connection timeout. Do you have the electron dependency in your package.json? My procfile is: (without ./build/app.js) maybe this can be the problem? I need to add ./build/app.js? |
|
@enrimon15 Hey sorry for the late response. Now about your timeout, I am not sure but it seems from your error that the "web" is not available, maybe you can try switch from "worker" to "web". again, I am not sure it is just what I can think of from the error you received. The ./build/app.js is just my path to run the build results file. It might be different for you so you don't have to copy it exactly like mine. |
|
I found a "solution". I had to switch to cedar-14 because it is the only working stack and it is deprecated, it will be kept only until November 2, 2020. So it's a temporary solution. So with apt I install xvfb on the server and with the xvfb library included in the project with npm I start the virtual server display that makes electron and consequently nightmare work. |
@RonDaha I solved this problem using a docker to build for heroku, using this link DockerfileFROM ubuntu:18.04 WORKDIR /app RUN echo "LC_ALL=en_US.UTF-8" >> /etc/environment RUN apt-get update RUN apt-get install -y wget curl gcc g++ make RUN curl -sL https://deb.nodesource.com/setup_10.x | bash RUN apt-get install -y RUN cd /tmp && ENV CHROME_BIN /usr/bin/google-chrome ADD . /app RUN npm install heroku.ymlbuild: |
|
@vininjr Docker had other problems when I try to deployed it to Heroku but I will try with your example and will update what's the results. |
|
For everyone how will have those issues in the future, after a very very long struggle I moved to puppeter.js. took me maybe 15 min to change my code since the API is very similar. manages to deploy it to Heroku with zero problems |

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

After a long struggle, I came here eventually seeking for any clue for a solution
I am trying to deploy nightmarejs app to heroku (which works perfectly on my mac).
I followed all the guides that I could found on the internet, including:
oscarmorrison
johann.pardanaud
kireerik
I also tried this
I kept getting errors that some packages missing so I adjusted the Aptfile followed by what I found online.
eventually the error I receive now is -
electron:stderr /app/node_modules/electron/dist/electron: symbol lookup error: /app/node_modules/electron/dist/electron: undefined symbol: udata_setCommonData_59 nightmare electron child process exited with code 127: command not found - you may not have electron installed correctlymy buildpacks are:
using heroku-18 as the stack.
My Aptfile:
x11-xkb-utils
xfonts-100dpi
xfonts-75dpi
xfonts-scalable
xfonts-cyrillic
libxfont1
libnotify4
libxss1
libgconf-2-4
libgtkextra-dev
libgconf2-dev
libnss3
libasound2
libxtst-dev
libxinerama1
libcairo-gobject2
x11-apps
clang
libdbus-1-dev
libgtk2.0-dev
libnotify-dev
libgnome-keyring-dev
libasound2-dev
libcap-dev
libcups2-dev
libnss3-dev
gcc-multilib
g++-multilib
there are probably some packages that don't really necessary in the Aptfile but after so many tries I'm totally confuse
My Procfile:
web: DEBUG=* xvfb-run --auto-servernum --server-args="-screen 0 1280x1028x24 -ac +extension GLX +render" node --harmony ./build/app.js
nightmare version - 3.0.2
nodejs version - 12.13.0
npm version - 6.12.0
let me know if there is anything else that need to be share here.
if someone can provide any information I'll be grateful!