I recently added functionality to create pdfs from dynamic data using this great tutorial from @ryanswapp. It worked great on my development server, but once I pushed it to my live site, I started getting the following errors:
I’m using a Digital Ocean server running Ubuntu, using mup to deploy. I’m no unix expert, but I think this is an issue with file system permissions on my server. Does anyone have any suggestions as to how I might be able to diagnose? Many thanks
Hey @miro, thanks for sharing. I use mup as well, and found out it was an issue with the path to phantomjs in my webshot call. I wasn’t using any phantomPath (per the webshot docs), which then defaults to an npm installation. Instead, I set the phantomPath option to where mup installs phantomjs, and it worked:
"phantomPath": "/usr/bin/phantomjs"
Hopefully that’s helpful for others going forward!
It’s worth noting here that my phantomPath is commented out. I believe that’s for my development machine, but I could have it mixed up. It’s been a while since I’ve working on this project. Maybe try removing your phantomPath and see if it works. Good luck!