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

Where Next?

Popular in Questions Top

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
aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
chokchit
** (DBConnection.ConnectionError) connection not available and request was dropped from queue after 2733ms. You can configure how long re...
New
lessless
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
dokuzbir
I want to highlight html closing tags when i click a html tag. That works in .html files but doesnt work for html.eex templates. How can...
New
aalberti333
As the title describes, I’m trying to run Enum.map() over a list of key/value pairs, where the value is a map. My data looks like this: ...
New
LegitStack
I’m trying to make a websocket server in Phoenix or raw Elixir. I heard about gun, I think I could use cowboy, but since I’m not that sma...
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
chensan
I have a User schema with a :from_id field set to type :string: defmodule TweetBot.Repo.Migrations.CreateUsers do use Ecto.Migration ...
New
WestKeys
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New

Other popular topics Top

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
AstonJ
Posting this to see if we can make things easier for people to get into Neovim. If you use Neovim and have a favourite distro please let ...
New
stefanluptak
Hello everybody, usually, I use a 29" ultra-wide monitor for VSCode which can easily accomodate explorer (files panel) + file with code ...
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
Emily
I have VueJS GUIs with the project generated using Webpack. I have Elixir modules that will need to be used by the VueJS GUIs. I fore...
New
Lily
In templates/appointment/index.html.eex: <%= for appointment <- @appointments do %> <tr> <td><%= appoi...
New
fayddelight
I tried installing elixir 1.11.2 erlang 23.3.4 via asdf in my zsh shell. Enabled the versions locally and globally. When I list them ...
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, "eq...
New
baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
axelson
This post is a wiki (feel free to hit the edit button near the bottom right of this post to add your own changes!) This post collects co...
239 47849 226
New

We're in Beta

About us Mission Statement