LionelHutz

LionelHutz

Mix Release - 'erlexec' not detected, when starting /any/ app, despite running fine in iex

I’m quite new to Elixir (and programming in general), so apologies if the fault turns out to be a simple one, and one of my doing:

tl:dr; When starting any app built with Mix Release, I keep getting the following error - despite the apps running fine via iex.bat -S mix, and reporting no errors in the Mix Release build process:

(I’m using Windows 10 64-bit, Erlang/OTP 21, Elixir 1.11.2)

/c/Users/../Documents/../../Mix Release/mix_release_1_phxapp_1/_build/prod/rel/ * app name */releases/0.1.0/../../erts-10.3/bin/erl:    line 12: /c/Users/../../Documents/../../Mix Release/mix_release_1_phxapp_1/_build/prod/rel/ * app name * /erts-10.3/bin/erlexec:   No such file or directory


**Explanation: **

I recently tried to create my first, simple, deployed app - I’ve not gone near this part of the production process before, so I followed this simple and friendly tutorial on how to do so (with the intention of eventually hosting it on Render.com).

However, this tutorial is for a standalone Phoenix app, and mine is an umbrella project with a database interface/repo/etc as the other child-app. I had to thus piece together how to adapt the tutorial for an umbrella app (primarily through ‘appropriately’ changing the ./build.sh script) - being very much a rookie, I ofc thought I might have caused the problem, in this process:

After tweaking the ‘./build.sh’ enough, I eventually got the app to build via Mix Release with no errors. And indeed, running it via iex.bat -S mix is errorless, too. However, when trying to locally start the Mix Released app after building it, I get a cryptic error, that I can hardly find any information for:

NOTE: I have cut out some of the long, superfluous bits of the file paths.

$ SECRET_KEY_BASE=`mix phx.gen.secret` _build/prod/rel/mix_release_1_phxapp_1/bin/mix_release_1_phxapp_1 start

/c/Users/../../Mix Release/mix_release_1_phxapp_1/_build/prod/rel/mix_release_1_phxapp_1/releases/0.1.0/../../erts-10.3/bin/erl: line 12: /c/Users/../../Mix Release/mix_release_1_phxapp_1/_build/prod/rel/mix_release_1_phxapp_1/erts-10.3/bin/erlexec: No such file or directory

My ./build.sh script, that I execute in Windows with GIT Bash:


echo "Building App"
#!/usr/bin/env bash
# exit on error
set -o errexit

# Initial setup
mix deps.get --only prod
MIX_ENV=prod mix compile

# Compile assets
cd ./apps/phxapp/assets && npm install
npm run deploy
cd ..
mix phx.digest
cd ../../
# Build the release and overwrite the existing release directory
MIX_ENV=prod mix release --overwrite

Again, I of course thought the error could come from trying to adapt the above tutorial to an umbrella app, but, I then tried the tutorial line-by-line with just a generic, standalone Phoenix app, created with mix phx.new etc.

Still the same error. Which tells me there’s something bigger I need to fix than a coding error of my own.

I have looked everywhere for info on erlexec, and how to solve this error, but haven’t found much (especially in terms of stuff that’s understandable to a novice like me) - all I’ve seen is that, apparently, erlexec is the code to actually generate the Erlang VM, on systems that don’t contain Erlang, so the Elixir app can run?

Secondly, apparently Windows 10 (which I’m using), and older, sometimes don’t include erlexec, unless you explicitly tell it to? I tried doing this, via adding set include_erts: true into config.exs, but to no avail. Though, I don’t know of course if any of that is right.


Apologies for the lengthy post - everything I’ve tried/tried to look up has hit a dead-end, so any help would be really appreciated!

Thanks so much

Most Liked

axelson

axelson

Scenic Core Team

Welcome to the Forum and to Elixir :tada:

To help us debug can you show us the contents of your mix.exs file?

derek-zhou

derek-zhou

Your nodejs is too new, 15? for node-sass@4.14.1. It is not a supported combo for node-sass. You can either downgrade nodejs to 14 or lower or upgrade node-sass to 5.0

Last Post!

LionelHutz

LionelHutz

Thanks for the suggestion! Indeed that may have been the case; however, I’ve managed to get it to work now! I no longer receive the node-sass error, and the app retained its LiveViiew reactivity.

I re-attempted a solution in one of my above-mentioned threads, but this time successfully. I documented in that thread how I did it, and I’ll paste it here, too:


What happened was that I’d tried the earlier hints in this thread to replace "node-sass" with "sass", in the package.json . In doing that, I simply pasted over the "node-sass": "xx.xx.xx" line with "sass": "^1.22.10" - however, the "node-sass": "xx.xx.xx" line was (originally) written immediately after the line for sass-loader. So now, "sass": "^1.22.10" comes after it - this seemed to be the problem.

When I experimented with putting the new "sass": "^1.22.10" before sass-loader, saved and npm installed, it seemed to work.

Does that seem to make sense (if not, maybe I’ve remembered wrongly about what I did to fix it)?


Thanks so much! Hope the info helps anyone to follow.

Where Next?

Popular in Questions Top

nobody
How to bind a phoenix app to a specific ip address? could not find anything about that, nowhere, unfortunately, but for me this is quite...
New
9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New
lastday4you
I wanted to check elixir version in phoenix because i found that my elixir is 1.5 but when i use Enum.chunk_by it said the function is un...
New
marius95
Hello everyone, I try to use an Javascript Event Handler in my root.html.leex file. Therefore I created a function in the app.js file: ...
New
skosch
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
New
lucidguppy
I have a super simple question about elixir - how would I take a file like this foo bar baz and output a new file that enumerates th...
New
RisingFromAshes
I’ve read in another post that it may be possible with a router helper - but I couldn’t find an appropriate one, and tbh, I’m still just ...
New
earth10
Hi, I’m just starting to build a side-project with Elixir and Phoenix and doing some basic test with Elixir alone. What strikes me is th...
New
minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New

Other popular topics Top

vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
hariharasudhan94
lets say i have a sample like a = 20; b = 10; if (a > b) do {:ok, "a"} end if (a < b) do {:ok, b} end if (a == b) do {:ok, "equa...
New
chrismccord
As promised, the first release candidate of Phoenix 1.3.0 is out! This release focuses on code generators with improved project structure...
New
TunkShif
This post is an instruction guide to help you setup your Neovim for Elixir development from scratch. It includes general information on h...
274 42158 114
New
pmjoe
I have a relationship of love and hate with Elixir. Lots of things are just absolutely right, but there are some things that are kind of ...
New
gausby
I asked this very same question on twitter and got some interesting feedback, but I thought it would be a good question to ask here as we...
1207 39523 209
New
AstonJ
Please see the new poll here: Which code editor or IDE do you use? (Poll) (2022 Edition) It’s been a while since we first asked this, I...
208 31307 143
New
RisingFromAshes
I’ve read in another post that it may be possible with a router helper - but I couldn’t find an appropriate one, and tbh, I’m still just ...
New
shijith.k
I am trying to start a new phoenix project with elixir 1.9, but mix phx.new does not work. It says that ** (Mix) The task "phx.new" could...
New
vegabook
I’m brand new to Phoenix and I have stripped one of the demo applications to the bone. I just want to get an svg up on the screen. Here i...
New

We're in Beta

About us Mission Statement