Closed huqiuyun closed 2 years ago
Hey @huqiuyun thanks for trying out bud! You'll need to run bud build
to make ./bud/app
self-contained.
The ./bud/app
built with bud run
indeed relies on go.mod
because that's the development build.
Hey @huqiuyun thanks for trying out bud! You'll need to run
bud build
to make./bud/app
self-contained.The
./bud/app
built withbud run
indeed relies ongo.mod
because that's the development build.
I tried and got the same issue
I just tested and I'm also able to reproduce this. Sorry for the confusion!
The problem is here: https://github.com/livebud/bud/blob/9e9272f37f0a480e354f066a860df06298365dca/runtime/generator/program/program.gotext#L36-L41
When the Embed
flag is true, we'll just need to embed the go.mod as a string and use gomod.Parse
instead of gomod.Load
Thanks, new go.mod file, and it is empty, the app is running too.
Create a new empty go.mod file, the app can run too.
Yep, pretty sure the contents of the go.mod
don't matter after bud build
, just needs something.
Please if publish it to online environment,what I need to do? do I need to publish the app and go.mod?
@huqiuyun right now the workaround is to create a go.mod
from the directory where you run ./bud/app
.
Hello, After I bud build the project, I remove the *.go and go.mod source files. run ./bud/app in the terminal, but it output the error: unable to find go.mod: file does not exist in "/Users/Works/news"
---- for exmaple input the command in the terminal news % ./bud/app unable to find go.mod: file does not exist in "/Users/Works/news"
Why the app is running and it needs to depend go.mod?