puppeteer-heroku-buildpack
puppeteer-heroku-buildpack copied to clipboard
mv: cannot stat '/app/.cache/puppeteer': No such file or directory
> mkdir ./.cache && mv /app/.cache/puppeteer ./.cache
mv: cannot stat '/app/.cache/puppeteer': No such file or directory
-----> Build failed
running into the same issues. Have you seen this issue yet? @jontewks
I had to downgrade puppeteer
@opeyemidy Downgrade to which version?
@ElitKondor "puppeteer": "^16.2.0",
@opeyemidy It really helped. Thanks!
This fixed it for me: Make sure the puppeteer buildpack is placed before the node js:
- Puppeteer
- NodeJS
For your package.json, add this line as the last thing to do after building everything else
"scripts": {
"build": "node node_modules/puppeteer/install.js && mkdir -p ./.cache && mv /app/.cache/puppeteer ./.cache",
}
before deploying:
heroku builds:cache:purge -a YOUR_APP
@hitwill does it work with the latest version of puppeteer?
having the same issue here :/
I downgraded puppeteer to "puppeteer": "^16.2.0" and did not use presented script command. The rest is the same as hitwill said. As heroku puppeteer buildpack i'm using a link to this repo ("https://github.com/jontewks/puppeteer-heroku-buildpack"). Don't remember to reorder buildpacks (Puppeteer -> Node) and redeploy something to make these changes work
@hitwill does it work with the latest version of puppeteer?
@opeyemidy yes. I am using: "puppeteer": "^21.2.0"
@hitwill
i'm getting this
Error: Cannot find module '/tmp/build_25b7743d/node_modules/puppeteer/install.js'
install
@opeyemidy try node node_modules/puppeteer/install.mjs
(mjs instead of js)
worked thanks @hitwill
@hitwill how were you able to find the solution? thank you!
ok I am facing a weird thing where,
if I purge, then trigger a deploy, it would work
but then if there is another deploy triggered, it would complain about the same error that is the title of this issue
ok I am facing a weird thing where,
if I purge, then trigger a deploy, it would work
but then if there is another deploy triggered, it would complain about the same error that is the title of this issue
Follow the conversation from here
@hitwill how were you able to find the solution? thank you!
Follow the conversation from here: https://github.com/jontewks/puppeteer-heroku-buildpack/issues/130#issuecomment-1720774565
Thank you @hitwill 🙏
@hitwill You seem to be the guru around here. I made sure the build pack was before NodeJS, added the script to .json file (used mjs) and then purged. Does this not all apply if using Next.js? I keep getting this in the logs
"[Error:` ENOENT: no such file or directory, open '/app/.next/BUILD_ID']"
and this..
State changed from starting to crashed at=error code=H10 desc="App crashed".
Is this just other non relevant issues maybe?
I got it to work by following creating a .cjs file etc from this post https://stackoverflow.com/questions/52225461/puppeteer-unable-to-run-on-heroku
Having some other cloudinary api_key issues now though.
Sorry for slow response here, but looked like it was working in a newer version of puppeteer. I'm also going to update this buildpack for the latest version of heroku, so will be sure latest heroku and latest puppeteer have all the kinks worked out.