** (CaseClauseError) no case clause matching: :eacces - Building release with MIX_ENV=prod
Asked Answered
P

1

6

I am not sure where to put that error, elixir, phoenixframework, or nodejs.

I am trying to create my first release build with elxir and phoenix. During the release build I see the following error. I am just not sure if this is a version/dependency problem or something that has to do with nodejs since the only information I could find related to eacces was in relationship with nodejs. Is there anything I am missing in my configuration?

Here is the error stack:

Building release with MIX_ENV=prod.
** (CaseClauseError) no case clause matching: :eacces
lib/exrm/utils/utils.ex:110: ReleaseManager.Utils.relx/5
lib/mix/tasks/release.ex:341: anonymous fn/4 in   Mix.Tasks.Release.do_release/1
lib/ex_unit/capture_io.ex:146: ExUnit.CaptureIO.do_capture_io/2
lib/ex_unit/capture_io.ex:119: ExUnit.CaptureIO.do_capture_io/3
lib/mix/tasks/release.ex:340: Mix.Tasks.Release.do_release/1
lib/mix/tasks/release.ex:78: Mix.Tasks.Release.do_run/1
(mix) lib/mix/task.ex:296: Mix.Task.run_task/3
(mix) lib/mix/cli.ex:58: Mix.CLI.run_task/2

My environment is as follows:

$ elixir -v
Erlang/OTP 19 [erts-8.1] [source] [64-bit] [smp:8:8] [async-threads:10] [hipe] [kernel-poll:false] [dtrace]

Elixir 1.3.4

$ npm --version
3.10.8

I run in a few version problems after adding exrm which I solved by adding to my dependencies the following:

 {:exrm, git: "git://github.com/bitwalker/exrm.git"},
 {:relx, github: "erlware/relx", override: true},
 {:erlware_commons, github: "erlware/erlware_commons", override: true},
 {:cf, "~> 0.2.1", override: true}

Three hours later...

I have created a fresh phoenix project using mix and could reproduce the problem. Once I added exrm I got the same error. I switchen then to distillery to see the same error. I created an issue on distillery with the hope to get there a solution. Issue 142 on distillery


EDIT:

Additional details on this issue from the distillery report:

$ uname -a Darwin Andreass-MBP. 16.1.0 Darwin Kernel Version 16.1.0: Thu Oct 13 21:26:57 PDT 2016; root:xnu-3789.21.3~60/RELEASE_X86_64 x86_64

I am at least four levels deep in a development tree that is fully owned by my account, under my home folder.

Plourde answered 27/11, 2016 at 20:47 Comment(3)
Look at this page. erlang.org/doc/man/file.html specifically search for eaccess. You'll see the most likely cause is insufficient permissions. Tell us the OS, etc. etc. We can't offer intelligent suggestions without details.Overactive
You're sure that you're not getting issues from Erlang itself? I see some notes about running Erlang on MacOSX (Jaguar) here: erlang.org/download/otp_src_R9C-0.readme You may want to insure that Erlang is working correctly.Overactive
Runs ok with sudo.Ophidian
S
0

TL;DR

This error is caused by a permission denied when attempt to write some artifact of build. You need to override EXRM with distilery and check files/directory permissions.

Long explanation

Error eacces means permission denied in Unix systems, ie, when your release task was attempting to write some builded file, this receives a permission denied from OS.

The CaseClauseError indicates that possibilty is not handled by case clausule in EXRM source code.

Anyway, EXRM was deprecated, and you need overide it with distillery

Supreme answered 28/10, 2019 at 12:45 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.