R
Railway11mo ago
LuaN

how can i install puppeteer to my application in Railway?

I'm running a Discord bot that needs to use puppeeter to generate images, and puppeeter needs to install some dependencies on the machine in order to work, is there any way to make this run on Railway?
29 Replies
Percy
Percy11mo ago
Project ID: N/A
LuaN
LuaN11mo ago
N/A
Brody
Brody11mo ago
do you have "puppeteer" in your package.json
LuaN
LuaN11mo ago
yes
Brody
Brody11mo ago
not the core version?
LuaN
LuaN11mo ago
LuaN
LuaN11mo ago
i have this error I believe this error occurs as I need to install some dependencies using apt-get as the documentation shows
Brody
Brody11mo ago
show me the documentation please
LuaN
LuaN11mo ago
GitHub
puppeteer/docs/troubleshooting.md at main · puppeteer/puppeteer
Node.js API for Chrome . Contribute to puppeteer/puppeteer development by creating an account on GitHub.
Brody
Brody11mo ago
are you deploying with nixpacks or a dockerfile
LuaN
LuaN11mo ago
nixpacks
Brody
Brody11mo ago
add this as a nixpacks.toml file to your project
[phases.setup]
aptPkgs = ["...", "libglib2.0-dev"]
[phases.setup]
aptPkgs = ["...", "libglib2.0-dev"]
LuaN
LuaN11mo ago
I solved it using Dockerfile to install all dependencies, thanks!
Brody
Brody11mo ago
damn and I already had the next thing to try already prepared
salvage
salvage11mo ago
btw @influente id recommend using browserless there is a template for it
⛧ ayami ʸᵒᵘⁿᵍᵇᵒʸ⛧
how it works? im having the same problem
salvage
salvage7mo ago
gooogle browserless
⛧ ayami ʸᵒᵘⁿᵍᵇᵒʸ⛧
is this right? https://railway.app/template/browserless how can i use it it created a repo on my github i hope u can help me pls 🙏 i can pay u for help if its necesary pls I need this to work 🙏
Brody
Brody7mo ago
may i ask you what you are wanting to use puppeteer / browserless for?
⛧ ayami ʸᵒᵘⁿᵍᵇᵒʸ⛧
Im trying to learn how to use it but it dont works on railway
Brody
Brody7mo ago
but what are you going to use it for specifically
⛧ ayami ʸᵒᵘⁿᵍᵇᵒʸ⛧
I think that puppeteer is used to extract data from websites Im watching tutorial to learn how to use it Im learning programation
Brody
Brody7mo ago
thats web scraping, web scraping is in railways tos
⛧ ayami ʸᵒᵘⁿᵍᵇᵒʸ⛧
oh ok so how can I solve the error
Brody
Brody7mo ago
i wont be able to provide support for something that is in railways tos
⛧ ayami ʸᵒᵘⁿᵍᵇᵒʸ⛧
but you helped someone on this thread or is not the same
Brody
Brody7mo ago
they where not web scraping they where just generating images
⛧ ayami ʸᵒᵘⁿᵍᵇᵒʸ⛧
mmh how could you make sure it won't be used for scrapping?
Brody
Brody7mo ago
https://railway.app/legal/terms section 6, subsection 8 going to lock this thread now, as it has been solved