-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error to call phantomjs in production. #5
Comments
How are you deploying your application? That error (ENOENT) means that a file is missing. The specific file is the phantom js binary. I suspect the reason its missing is because you built your application bundle on a windows machine and then deployed it to Linux. I've never developed a Meteor app on windows so I'm not sure what the best solution is. If you haven't given mupx a try that might be the way to go. It contains everything inside a docker container and is likely to resolve the issue. |
I'm deploying use meteor build and extracting it into Linux server. I'll try to build in a linux and deploy it. |
Ya that's your problem then. Generally, you need to build your app in the environment in which you plan to deploy to. |
Cool, I'll try on linux and tell you, Other dobt is on development I could make your example. But wanted to know if I can instead of using pokemon-reports.html some other template out of the private folder in the case client/views, or other alternative of Asses.getText This is because I have one big report and I don't wana create other template just to generate a PDF, I want to reuse it |
You don't need to use a template. The key is that you need to pass a string of html to webshot. You can build that however you'd like. Get Outlook for iOS
From: felipesmendes [email protected] Cool, I'll try on linux and tell you, Other dobt is on development I could make your example. But wanted to know if I can instead of using pokemon-reports.html some other template out of the private folder in the case client/views, or other alternative of Asses.getText This is because I have one big report and I don't wana create other template just to generate a PDF, I want to reuse it — |
I understood, thank you! Do you now some method to transform my template in a string? Can I use Blaze.toHTML in server? |
You could grab all the html by calling the jquery html method on the outermost container. Something like $('.wrapper').html(). You would still need to add CSS to it which you could do server side with the juice npm module. Get Outlook for iOS On Fri, Jul 22, 2016 at 8:52 AM -0600, "felipesmendes" [email protected] wrote: I understood, thank you! Do you now some method to transform my template in a string? — |
Hi Ryan,
I'm developing my application in Windows but my server production is in Linux and when I call the webshot method is given this error:
I think its because I installed NPM packages in Windows.
Do you know how to solve it?
The text was updated successfully, but these errors were encountered: