Hi team. I tried to create Amper project from New ...
# kotlin-toolchain
g
Hi team. I tried to create Amper project from New Project template but not able to run the app. says "ERROR: No run tasks are available for module '...`"
message has been deleted
message has been deleted
Any ideas how to run this main function?
j
It looks like you created a lib, not an app. Could you please check the
product:
section in
module.yaml
?
We have definitely discussed supporting running arbitrary
main
functions in libraries too, so that this kind of gutter icon can work. I'm trying to find if we have a ticket for this, but I can't so far
f
But the error message can definitely be improved even if we don't support this. There is no need to mention tasks.
💯 1
j
I'm 100% with you here. Same for the publication failure when modules aren't publishable.
g
thanks, fixed it. but same issue is in mutiplatform cli application template, there is main function and I can not run it, have to add a new kt file in jvm target to run
j
Oh that's a great point. This structure with
main
in the shared module is technically valid, but strange from the IDE's point of view. And indeed the gutter doesn't work in that case. Sorry about this. Maybe we need to change the template to avoid this confusion, at least while we don't support this gutter run. In the meantime, you should be able to run the apps from the generated run configurations in the top-right: