-
-
Notifications
You must be signed in to change notification settings - Fork 67
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
Prevents booting when which
is missing
#108
Comments
@coder2000 Does this config work for your use case? Which OS are you using? # config/initializers/mjml.rb
Mjml.setup do |config|
config.mjml_binary = "/path/to/custom/mjml"
end |
i think the issue is related to using I have the same issue - if i use |
@johannesschobel Oh interesting. Is there something that can be done to fix it? |
Actually, I don't know yet.. I will try to set up a reproduction repository in order to isolate this issue. Will need some time for this. Maybe next week. I would like to rule other possible issues out, because I only tried this in my real application. I will come back to this issue with more information and try to explain the steps. All the best |
ok.. i think, i got one step closer.. This left me puzzled, as i thought that this may be the issue.. Running Then i tried the same command yarn run mjml-cli --version
yarn run v1.22.17
$ /home/schobel/projects/rails/XXX/node_modules/.bin/mjml-cli --version
/home/schobel/projects/rails/XXX/node_modules/string-width/index.js:2
const stripAnsi = require('strip-ansi');
^
Error [ERR_REQUIRE_ESM]: require() of ES Module /home/schobel/projects/rails/XXX/node_modules/strip-ansi/index.js from /home/schobel/projects/rails/XXX/node_modules/string-width/index.js not supported.
Instead change the require of /home/schobel/projects/rails/XXX/node_modules/strip-ansi/index.js in /home/schobel/projects/rails/XXX/node_modules/string-width/index.js to a dynamic import() which is available in all CommonJS modules.
at Object.<anonymous> (/home/schobel/projects/rails/XXX/node_modules/string-width/index.js:2:19)
at Object.<anonymous> (/home/schobel/projects/rails/XXX/node_modules/cliui/build/index.cjs:291:21)
at Object.<anonymous> (/home/schobel/projects/rails/XXX/node_modules/yargs/build/index.cjs:2861:12)
at Object.<anonymous> (/home/schobel/projects/rails/XXX/node_modules/yargs/index.cjs:5:30)
at Object.<anonymous> (/home/schobel/projects/rails/XXX/node_modules/mjml-cli/lib/client.js:34:37)
at Object.<anonymous> (/home/schobel/projects/rails/XXX/node_modules/mjml-cli/bin/mjml:3:1) {
code: 'ERR_REQUIRE_ESM'
}
Node.js v18.17.1
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. So the issue points to the Need to dig a bit deeper.. But these are my results so far.. Hope this helps someone a bit further. Will post updates again. All the best, |
if you then run dont ask?! |
In another github issue (cannot find the link) they mentioned, that this may be an issue related to an old version of Note, that the Issue could also be related to an old yarn version?! I will try, if this is the case |
i ended up running a
in my |
If binaries aren't found, try to use |
Current version apparently uses
which
to locate the mjml binary, however if it is not installed on the system the app will not boot and throw an exception.The text was updated successfully, but these errors were encountered: