-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
[Bug]: Node: Argument list too long #25
Comments
Using temporary files is a good idea I think, I'd definitely accept a PR that implements this |
Ok cool, will work on this today, thanks for the quick response @riasvdv! 👍 |
Ah, unfortunately discovered this may be easier said than done after looking through this:
Closing this out. Will have to create my own package instead! 👍 |
I think you’re able to pass all the config options necessary https://github.com/mjmlio/mjml/blob/master/packages/mjml-cli/README.md#available-options The sidecar version would need to have the current behaviour though, as there’s no way to send a file. Maybe we could have it configurable? If you’re more comfortable with a separate package, then that’s fine for us as well of course 😄 |
@stevebauman I opened a draft PR with an implementation #26 would you be willing to test it and see if you have any remarks? |
Sorry for the late reply @riasvdv, signed off on Thursday and have been sick as a dog since. Almost back now though. We're currently using the originally posted implementation in prod now which resolved the issue so I don't want to flip it back to test in case -- but I'll give it a review 👍 |
What happened?
I have some really large MJML templates (several megabytes) that I'm rendering in production, but they're failing to render with this library due to the MJML being too long to send as a command line input.
I think the current approach of sending the base-encoded MJML to render as a string to a custom JS script to then decode it and process it through the MJML library could be improved. Instead, we could:
mjml
command, along with a new tmp file path to output infile_get_contents
of the output to returnI have this working in production right now and it removes the need for a middleman script, along with base64 encoding/decoding completely.
I was going to build my own MJML PHP library with this approach, but wanted to see if this may be something you're interested in integrating before doing so. Let me know!
Here's my working code:
How to reproduce the bug
Attempt to generate a few megabytes in size of MJML.
Package Version
1.2.1
PHP Version
8.2
Which operating systems does with happen with?
No response
Notes
No response
The text was updated successfully, but these errors were encountered: