Error: engines.node must be specified

Balena OS version: balenaOS 2.113.18
Type: Development
Device: Raspberry Pi Zero W

When I try to deploy the Anthias project into BalenaCloud device, I get the following error:

balena --debug push <myfleetname>
[debug] handling message: {"message":"\u001b[31m[Error]\u001b[39m    Could not detect project type: Service main: package.json: engines.node must be specified","isError":true}
[Error]    Could not detect project type: Service main: package.json: engines.node must be specified
[debug] handling message: {"message":"\u001b[31m[Error]\u001b[39m    Not deploying release.","isError":true}
[Error]    Not deploying release.
Remote build failed

RemoteBuildFailedError: Remote build failed
    at handleRemoteBuildStream (/usr/local/lib/balena-cli/build/utils/remote-build.js:83:15)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async Object.startRemoteBuild (/usr/local/lib/balena-cli/build/utils/remote-build.js:64:13)
    at async PushCmd.pushToCloud (/usr/local/lib/balena-cli/build/commands/push.js:78:27)
    at async (/usr/local/lib/balena-cli/build/commands/push.js:32:17)
    at async PushCmd._run (/usr/local/lib/balena-cli/node_modules/@oclif/command/lib/command.js:43:20)
    at async Config.runCommand (/usr/local/lib/balena-cli/node_modules/@oclif/config/lib/config.js:175:24)
    at async (/usr/local/lib/balena-cli/node_modules/@oclif/command/lib/main.js:28:9)
    at async CustomMain._run (/usr/local/lib/balena-cli/node_modules/@oclif/command/lib/command.js:43:20)
    at async /usr/local/lib/balena-cli/build/app.js:76:13
    at async Promise.all (index 2)
    at async oclifRun (/usr/local/lib/balena-cli/build/app.js:94:5)
    at async (/usr/local/lib/balena-cli/build/app.js:107:9)
    at async run (/usr/local/lib/balena-cli/bin/run:20:2)

I tried adding the node engine version into the package.json and pushing that. It was successfull however, then the service keep restarting with the following error when I look at the device logs in the BalenaCloud:

Service exited 'main sha256:aab0d9cbf68b3665e76b801f094eece0d2a9010e91a013c129940761f692a4fa'
Restarting service 'main sha256:aab0d9cbf68b3665e76b801f094eece0d2a9010e91a013c129940761f692a4fa'
 main  /sbin/udevd
 main  npm ERR! missing script: start
 main  npm ERR! A complete log of this run can be found in:
 main  npm ERR!     /root/.npm/_logs/2023-05-29T22_16_18_496Z-debug.log

I can’t connect to the local IP address specified in the BalenaCloud, I don’t know if that’s a separate issue.

@cyolveren, I’d like to confirm if you’re trying to deploy Anthias on your own Balena Cloud fleet.
We haven’t added docs yet specific to deploying Anthias on a fleet. In the meantime, I’ll try to help you out on this one.

What other specific commands and steps did you run and do (respectively)?

(Looking at the error, it might be that Balena is looking for a docker-compose.yml when running balena push).

Looking closely at the Anthias repo, there’s only that docker-compose.balena.yml.tmpl file.
There should be a script for generating a docker-compose.yml file. As a temporary workaround, you can take a look at this diff. I’ve applied the changes on my forked Anthias repo, in balena-deploy-2 branch.

I’d like to hear back from you. (How can I be of further help?) Thanks!