简体   繁体   English

** (CaseClauseError) 没有 case 子句匹配::eacces - 使用 MIX_ENV=prod 构建版本

[英]** (CaseClauseError) no case clause matching: :eacces - Building release with MIX_ENV=prod

I am not sure where to put that error, elixir, phoenixframework, or nodejs.我不确定把那个错误、elixir、phoenixframework 或 nodejs 放在哪里。

I am trying to create my first release build with elxir and phoenix.我正在尝试使用 elxir 和 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.我只是不确定这是版本/依赖性问题还是与 nodejs 有关的问题,因为我能找到的与 eacces 相关的唯一信息与 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 后,我遇到了一些版本问题,我通过将以下内容添加到我的依赖项中解决了这些问题:

 {: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.我使用 mix 创建了一个新的凤凰项目,并且可以重现该问题。 Once I added exrm I got the same error.添加 exrm 后,我遇到了同样的错误。 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关于酿酒厂的第 142 期


EDIT:编辑:

Additional details on this issue from the distillery report:酒厂报告中有关此问题的其他详细信息:

$ uname -a Darwin Andreass-MBP. $ uname -a Darwin Andreass-MBP。 16.1.0 Darwin Kernel Version 16.1.0: Thu Oct 13 21:26:57 PDT 2016; 16.1.0 Darwin 内核版本 16.1.0:2016 年 10 月 13 日星期四 21:26:57 PDT; root:xnu-3789.21.3~60/RELEASE_X86_64 x86_64根: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.我在我的主文件夹下完全由我的帐户拥有的开发树中至少有四个级别。

TL;DR TL; 博士

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.您需要使用蒸馏器覆盖 EXRM 并检查文件/目录权限。

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.错误eacces表示 Unix 系统中的权限被拒绝,即,当您的发布任务尝试写入某个构建的文件时,这会收到来自操作系统的拒绝权限。

The CaseClauseError indicates that possibilty is not handled by case clausule in EXRM source code. CaseClauseError表示 EXRM 源代码中的 case clausule 不处理可能性。

Anyway, EXRM was deprecated, and you need overide it with distillery无论如何,EXRM 已被弃用,您需要使用酒厂覆盖它

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM