My team and I recently started using Bun instead of Yarn/NPM to manage JavaScript packages. The switch was quite painless, but our deploy to Heroku failed with the following error:
ActionView::Template::Error: Couldn't find the MJML 4. binary.. have you run $ npm install mjml?
11 # @param input [String] The string to transform in html
12 def initialize(input)
13 raise Mjml.mjml_binary_error_string unless Mjml.valid_mjml_binary
14
15 @input = input
I'm in the process of testing this locally, so I wouldn't say it's completely ready for review yet.
I see that adding the method to check for Bun has pushed the file over its line length limit. I'll try to abstract the methods related to finding the MJML binary into a utility module and then push my updates up here.
My team and I recently started using Bun instead of Yarn/NPM to manage JavaScript packages. The switch was quite painless, but our deploy to Heroku failed with the following error:
After some digging, I realized that we specifically check for MJML in each given package manager:
This PR adds a method to check for the Bun MJML binary.