Closed AdrianRibao closed 5 years ago
More information about this:
This works:
MIX_ENV=dev mix compile
but this fails with the previous error:
MIX_ENV=prod mix compile
I just found the issue!
Just in case it helps others, it was a wrong path in the template:
<%= Routes.static_path(@conn, "/videos/demo.mp4") %>
It turns out demo.mp4 wasn't available and that made the compilation fail. Commenting that line made it work!
Sorry, unfortunately that wasn't the problem, I had removed the plug comment accidentally, and that's why I didn't get the error... So back to square one.
@AdrianRibao Apologies for now being responsive on this. Still an issue for you I assume? I can only think of it as a compilation order issue and I'm finding it hard to reproduce.
I think this may have been similar to issue #124 and I have applied the same "fix" with this commit. I will close this issue for now but of course please reopen it if my assumption is incorrect.
@kipcole9 I ended up using my own plug because I couldn't use this package. I'll try to use the latest version when it's released, and check if it's fixed.
Thanks!
Totally understand and I'm sorry I let you down (in fact somehow I didn't even see you had reopened the issue although thats not an excuse).
The new version is on hex now as ex_cldr version 2.7.2.
@kipcole9 Hi! Just to let you know, I'm getting the same error as in OP in the latest version. dev
env compiles fine, but then in test
env SetLocale
plug fails to validate the cldr module.
@syfgkjasdkn Do you have a test case I can work on? Or at least an example you're trying that is failing? Please also open a new issue - this issue was related to compilation ordering.
I have a Phoenix application where I have
SetLocale
set like this inrouter.ex
where:
it works fine on dev, but when I try to compile for production inside a docker container, the compilation fails for
router.ex
:and in the config I have:
Am I doing something wrong or maybe there is a bug somewhere?