Compilation error - Mix could not compile dependency :yamerl

Hi again , i tried to compile my app and raise this error.

** (Mix) Could not compile dependency :yamerl, “escript.exe “c:/Users/Yendris/.m
ix/rebar3” bare compile --paths “c:/workspace/nectarcommerce/_build/dev/lib/*/eb
in”” command failed. You can recompile this dependency with “mix deps.compile ya
merl”, update it with “mix deps.update yamerl” or clean it with “mix deps.clean
yamerl”

Where is the problem? I have installed rebar3, mix, hex.

What if you go into it’s directory in the deps directory and compile it via rebar straight? Put rebar into verbose mode too. What are the results?

Mix is a bit to quite here.

This message can mean

  • escript.exe is not in path,
  • rebar3 script is not available,
  • The build of the mentioned package fails for invisible reasons.

So check if escripts is available (where escript), if rebar3 is available where mix expects it and is a regular file (check the content of c:/Users/Yendris/.m
ix) and also do as @OvermindDL1 suggests and try to run rebar3 manually from the deps folder.

1 Like

When I run (rebar3 compile) inside the directory, everything works correctly, the problem is when I use mix

Have you checked my 3 bullet points? The rebar3 used when you run it manually is not the same as the one that mix uses. Also the kind of invocation is totally different.

Oh and when running manually, please try exactly as mix tried to invoke it.

1 Like

Windows does not recognize rebar3 when I install it from the hex.pm repository, I had to download rebar from github and add it to the path to work.

Don’t install one like that, rather use the one mix installed by it’s direct path, somewhere in $HOME/.mix as I recall. It’s never added directly to the path.

When I eliminate all of the above and start the process again, this is what happens.

Could not find “rebar3”, which is needed to build dependency :yamerl
I can install a local copy which is just used by Mix
Shall I install rebar3? (if running non-interactively, use “mix local.rebar --fo
rce”) [Yn] y

  • creating c:/Users/Yendris/.mix/rebar
  • creating c:/Users/Yendris/.mix/rebar3
    ===> Compiling yamerl
    ** (Mix) Could not compile dependency :yamerl, “escript.exe “c:/Users/Yendris/.m
    ix/rebar3” bare compile --paths “c:/workspace/nectarcommerce/_build/dev/lib/*/eb
    in”” command failed. You can recompile this dependency with “mix deps.compile ya
    merl”, update it with “mix deps.update yamerl” or clean it with “mix deps.clean
    yamerl”

C:\workspace\nectarcommerce>rebar3
“rebar3” no se reconoce como un comando interno o externo,
programa o archivo por lotes ejecutable.

Let me ask again (3rd time now) is escript.exe in your path? Are the files rebar and rebar3 at the places mix expects them? What is the output when you run the exact same command that mix reports as failed in the deps folder?

(I appreciate your help and your patience )

the files rebar and rebar3 are in C: \ Users \ Yendris \ .mix, as for escript.exe I can not find it anywhere, exactly in windows where it should be installed?

On the other hand rebar3 despite being installed does not recognize it from the cmd.

Of the other thing that he mentions in his points I do not have a clear idea of how to do it

This depends on how you installed Erlang.

escript.exe is in the path, but the script for rebar3 does not recognize it in the cmd, I have deleted it, I have reinstalled it and it does not recognize it, I will have to investigate a little, thanks for the help

I do not understand, is it in your PATH or is it not?

Also what happens when you cd into the deps folder and run escript.exe “c:/Users/Yendris/.mix/rebar3” bare compile --paths “c:/workspace/nectarcommerce/_build/dev/lib/*/ebin”? Please tell us the full output.

1 Like

Hello again what you mention is in the path and the files rebar and rebar3 are in C: \ Users \ Yendris \ .mix

The output is :

C:\workspace\nectarcommerce\deps>escript.exe “c:/Users/Yendris/.mix/rebar3” bare
compile --paths "c:/workspace/nectarcommerce/_build/dev/lib/*/ebin
escript: Failed to open file: ÔÇ£c:/Users/Yendris/.mix/rebar3ÔÇØ

1 Like

Does dir c:/Users/Yendris/.mix work?

If it does not work, after removing path segment by segment, when does it start to work?

Your design looks like Vista or 7, as far as I remember symlinking the user folder to its localized name was buggy in that versions…

If none of the above work, please try to use back- instead of forward slashes and try again.