作业规范中未指定入口点。在作业规范中添加入口点或为其提供 --entry 标志

no entrypoint was specified in job specification. Either add an entrypoint in the job spec or provide it with the --entry flag

我正在尝试将我的第一个 Toit 代码部署到我的设备上。我正在按照我能在 Toit 和伺服系统上找到的唯一教程进行操作,当需要使用 TOIT CLI 进行部署时,我收到以下错误消息:

no entrypoint was specified in job specification. Either add an entrypoint in the job spec or provide it with the --entry flag.

我感觉我的 .toit 文件和 .yaml 文件之间的命名可能不一致。我以为我检查了所有的方框,但每次都感到沮丧。你能识别这个错误吗?这是我被告知要使用的命令(进行了两次替换): $toit deploy -d rough-hall coop-door.yaml

app specification 告诉 Toit 框架如何运行 Toit 程序。

为此它至少需要两件事:

  • 名字
  • 哪个 Toit 文件到 运行

第二个在 yaml 文件中称为“入口点”。

一个简单的应用程序 yaml 文件可能如下所示:

name: simple_app
entrypoint: my_app.toit

更具体地针对您的问题

我假设您指的是 this chicken-coop tutorial

一些示例中的代码有点混乱(比如 cron 作业的最后一行不是预期的)。也许这就是出现错误的原因。

尝试直接使用 github 存储库中的代码:https://github.com/Open-Cloudware/toit-servo-coop-door/blob/main/servo_door_day.yaml

我克隆了那个存储库,然后 运行

toit pkg install
toit deploy servo_door_day.yaml

然后在我的设备上安装了应用程序。