toit

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


I'm trying to deploy my very first Toit code to my device. I'm following the only tutorial I can find on Toit and servos and when it comes time to deploy using the TOIT CLI I get the following error message:

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

I have a feeling that something might not be lining up in naming between my .toit file and the .yaml file. I thought I checked all the boxes but have been frustrated at every turn. Can you identify with this error? Here's the command I'm being told to use(with the two substitutions being made): $toit deploy -d rough-hall coop-door.yaml


Solution

  • The app specification tells the Toit framework how to run a Toit program.

    For that it needs at least two things:

    The second one is called "entrypoint" in the yaml file.

    A simple app yaml file could look like the following:

    name: simple_app
    entrypoint: my_app.toit
    

    More specifically to your question

    I'm assuming you are referring to the this chicken-coop tutorial.

    The code in some of the examples got mangled a bit (like the last line of the cron job not being intended). Maybe that's the reason there is an error.

    Try to use the code directly from the github repository: https://github.com/Open-Cloudware/toit-servo-coop-door/blob/main/servo_door_day.yaml

    I cloned that repository and then ran

    toit pkg install
    toit deploy servo_door_day.yaml
    

    and that installed the application on my device.