executable file not found in $PATH
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 30/100
调研方向
从 Lambda 的 ENTRYPOINT 值开始,将其与 lib/ngspice_proxy.ex 中显示的模块和函数进行比较。然后检查 mix.exs 和 Dockerfile,并运行镜像或部署流程;当浏览器调用能够在不出现 Runtime.InvalidEntrypoint 的情况下到达 hello_world 时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
I am getting this error when trying to view it in the browser:
RequestId: 3f848f5e-4cb4-4820-aa55-fef28313dfd5 Error: exec: "Elixir.NgspiceProxy:hello_world": executable file not found in $PATH
Runtime.InvalidEntrypoint
At Lambda setup:
ENTRYPOINT override
Elixir.NgspiceProxy:hello_world
here is my entrypoint: lib/ngspice_proxy.ex
defmodule NgspiceProxy do
@moduledoc """
Entrypoint for my hello world Lambda function.
"""
require Logger
@doc """
The lambda entrypoint is just a public function in a module which accepts
two maps.
The returned term will be passed to Poison for Json Encoding.
"""
@spec hello_world(Map.t(), Map.t()) :: Term
def hello_world(request, context) when is_map(request) and is_map(context) do
"""
Hello World!
Got reqeust #{Kernel.inspect(request)}
Got Context #{Kernel.inspect(context)}
"""
|> Logger.info()
:ok
end
end
mix.exs
defmodule NgspiceProxy.MixProject do
use Mix.Project
def project do
[
app: :ngspice_proxy,
version: "0.1.0",
elixir: "~> 1.5",
elixirc_paths: elixirc_paths(Mix.env()),
compilers: [:phoenix, :gettext] ++ Mix.compilers(),
start_permanent: Mix.env() == :prod,
aliases: aliases(),
deps: deps()
]
end
def application do
[
mod: {NgspiceProxy.Application, []},
extra_applications: [:logger, :runtime_tools, :edeliver],
]
end
defp deps do
[
{:aws_lambda_elixir_runtime, "~> 0.1.0"},
{:phoenix, "~> 1.4.7"},
{:phoenix_pubsub, "~> 1.1"},
{:phoenix_html, "~> 2.11"},
{:phoenix_live_reload, "~> 1.2", only: :dev},
{:gettext, "~> 0.11"},
{:jason, "~> 1.0"},
{:plug_cowboy, "~> 2.0"},
{:temp, "~> 0.4"},
{:cortex, "~> 0.1", only: [:dev, :test]},
{:edeliver, ">= 1.6.0"},
{:distillery, "~> 2.1.1"},
{:mix_deploy, "~> 0.1.0"},
{:rename, "~> 0.1.0", only: :dev}
]
end
defp aliases do
[
"ecto.setup": ["ecto.create", "ecto.migrate", "run priv/repo/seeds.exs"],
"ecto.reset": ["ecto.drop", "ecto.setup"],
test: ["ecto.create --quiet", "ecto.migrate", "test"]
]
end
end
Dockerfile
FROM elixir:1.6.6-otp-21 as build
RUN apt-get update
RUN apt-get install -y inotify-tools
WORKDIR /app
COPY . /app
RUN mix local.hex --force
RUN mix local.rebar --force
RUN mix deps.get
RUN mix compile.phoenix
FROM elixir:1.6.6-otp-21-alpine as final
RUN apk update && apk add inotify-tools
WORKDIR /app
COPY --from=build /app .
COPY --from=build /usr/bin/ngspice /usr/bin/ngspice
ENV PATH="${PATH}:/app"
EXPOSE 8080
CMD ["mix", "phx.server"]
Any idea ?
- 主要语言
- Elixir
- 星标
- 129
- 派生
- 31
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
aws-samples/aws-lambda-elixir-runtime 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 25/100
-
难度 4/5 3-5 天 新手友好度 35/100
-
难度 4/5 3-5 天 新手友好度 25/100
-
难度 4/5 3-5 天 新手友好度 30/100
aws-samples/aws-lambda-elixir-runtime#11 · 1 条评论 ·
-
难度 3/5 1-2 天 新手友好度 30/100
aws-samples/aws-lambda-elixir-runtime#8 · 5 条评论 · 1 个 reaction ·
查看 aws-samples/aws-lambda-elixir-runtime 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
QuinnWilton/argus#5 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 76/100
carverauto/serviceradar#5009 ·
维护者通常 1 天内回复
-
help-wanted L: docker L: elm L: github:actions L: helm L: ruby:bundler
难度 2/5 1-3 小时 新手友好度 85/100
dependabot/dependabot-core#16425 ·
维护者通常 2 天内回复
-
bug javascript
难度 2/5 1-3 小时 新手友好度 86/100
维护者通常 1 天内回复
-
Cainophile EXIT handler crashes on its own password redaction and logs the DB password in clear text未关闭
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 2 天内回复