balena-io / balena-cli

The official balena CLI tool.
Apache License 2.0
453 stars 138 forks source link

Can't add a release #2484

Open GYKgamer opened 2 years ago

GYKgamer commented 2 years ago

Actual Behavior

C:\Users\User>balena login | | | | ____ | ' \ / _|| | / __ \| '_ \ / _ | | |) | () || || _/| | | || () | |./ _,||| ____/|| || _,_|

Logging in to balena-cloud.com ? How would you like to login? Web authorization (recommended) Opening web browser for URL: https://dashboard.balena-cloud.com/login/cli/http%253A%252F%252F127.0.0.1%253A51608%252Fauth Successfully logged in as: g_gykgamer

Find out about the available commands by running:

$ balena help

For further help or support, visit: https://www.balena.io/docs/reference/balena-cli/#support-faq-and-troubleshooting

C:\Users\User>balena push g_gykgamer/wifi-to-ethernet Error: no "Dockerfile[.*]", "docker-compose.yml" or "package.json" file found in source folder "."

C:\Users\User>


C:\Users\User>balena push g_gykgamer/wifi-to-ethernet --debug
[debug] new argv=[C:\Program Files\balena-cli\client\bin\node.exe,C:\Program Files\balena-cli\client\bin\run,push,g_gykgamer/wifi-to-ethernet] length=4
[debug] Deprecation check: 0.00670 days since last npm registry query for next major version release date.
[debug] Will not query the registry again until at least 7 days have passed.
[Debug]   Using build source directory: .
Error: no "Dockerfile[.*]", "docker-compose.yml" or "package.json" file
found in source folder "."

ExpectedError: Error: no "Dockerfile[.*]", "docker-compose.yml" or "package.json" file
found in source folder "."
    at validateProjectDirectory (C:\Program Files\balena-cli\client\build\utils\compose_ts.js:641:19)
    at async PushCmd.run (C:\Program Files\balena-cli\client\build\commands\push.js:23:53)
    at async PushCmd._run (C:\Program Files\balena-cli\client\node_modules\@oclif\command\lib\command.js:43:20)
    at async Config.runCommand (C:\Program Files\balena-cli\client\node_modules\@oclif\config\lib\config.js:175:24)
    at async CustomMain.run (C:\Program Files\balena-cli\client\node_modules\@oclif\command\lib\main.js:27:9)
    at async CustomMain._run (C:\Program Files\balena-cli\client\node_modules\@oclif\command\lib\command.js:43:20)
    at async C:\Program Files\balena-cli\client\build\app.js:76:13
    at async Promise.all (index 2)
    at async oclifRun (C:\Program Files\balena-cli\client\build\app.js:94:5)
    at async Object.run (C:\Program Files\balena-cli\client\build\app.js:107:9)
myarmolinsky commented 2 years ago

Hello @GYKgamer , when you ran balena push g_gykgamer/wifi-to-ethernet, the command tried to push a release to the fleet g_gykgamer/wifi-to-ethernet from the directory you were currently in. It seems there was no "Dockerfile[.*]", "docker-compose.yml" or "package.json" file in that directory. Was that the directory you intended to attempt to push a release from? Or did you expect interactive prompts perhaps?

The correct usage for the balena push command is outlined here: https://github.com/balena-io/balena-cli/blob/master/docs/balena-cli.md#push-fleetordevice