Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

executable file not found in $PATH

Đang mở
#13 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
30/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
aws, docker, elixir
Lĩnh vực
backend, cloud

Hướng nghiên cứu

Bắt đầu với giá trị ENTRYPOINT của Lambda và so sánh giá trị đó với module và function được hiển thị trong lib/ngspice_proxy.ex. Sau đó kiểm tra mix.exs và Dockerfile, rồi chạy image hoặc luồng deployment; hoàn tất khi lời gọi từ trình duyệt đến được hello_world mà không gặp Runtime.InvalidEntrypoint.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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 ?

Ngôn ngữ chính
Elixir
Star
129
Fork
31
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của aws-samples/aws-lambda-elixir-runtime

Tất cả issue của aws-samples/aws-lambda-elixir-runtime

Issue tương tự

Thêm issue về Elixir

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.