Skip to content
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

relx can't find app #991

Open
rlipscombe opened this issue Sep 22, 2023 · 3 comments
Open

relx can't find app #991

rlipscombe opened this issue Sep 22, 2023 · 3 comments

Comments

@rlipscombe
Copy link
Contributor

rlipscombe commented Sep 22, 2023

See ninenines/cowboy#1593.

The working directory has to match the application name. A dash followed by a version may be present. Without this, you get a hard-to-understand error:

init terminating in do_boot ({{error,{rlx_resolve,{app_not_found,middleware,undefined}}},
[{rlx_resolve,find_app_in_code_path,2,[{_},{_}]},{rlx_resolve,subset,6,[{_},{_}]},{rlx_resolve,solve_release,2, 

(wrapped for "readability"; the app is called middleware)

The important bit is {error,{rlx_resolve,{app_not_found,APPLICATION_NAME,undefined}}}.

This is particularly a problem if you're building inside a container (because it's common to use WORKDIR /build, and that's not gonna match).

@FrancescoRestelli
Copy link

this really needs some attention, i went and patched my own version of rlx_resolve.erl to solve this in the past, however that broke now with otp26 :)

please add a nice print

@pavel-baturko-sb
Copy link

this is an annoying issue, especially in CI environments

@essen
Copy link
Member

essen commented Mar 21, 2024

Best I can do is a nicer error message. This is an expectation of OTP that the folder name matches the application name (with an optional dash followed by anything you want). A PR implementing the nicer error message is welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants