Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

templ version check: failed to read go.mod file: open /go.mod: no such file or directory #704

Closed
kanstantsin-chernik opened this issue Apr 26, 2024 · 2 comments

Comments

@kanstantsin-chernik
Copy link

kanstantsin-chernik commented Apr 26, 2024

I just updated the templ version to v0.2.663 and noticed a warning from the build:

(!) templ version check: failed to read go.mod file: open /go.mod: no such file or directory

We rely on monorepo and go.mod is not where templ would expect it to be. Also, we integrated templ with bazel build.
Can we skip the warning if the go.mod wasn't found or provide an option to silence it? I don't want to silence all output as it is useful to know when the file could be transposed correctly

Alternatively, we can provide the path to go.mod with an arg instead of templ assuming where it is
I found --path param. Unfortunately, in bazel I cannot just refer any files in the project and go.mod has limited visibility

@kanstantsin-chernik
Copy link
Author

Ok, seems like "-log-level", "error" does the magic trick. Will keep the issue here just for you to know about the use case

@joerdav
Copy link
Collaborator

joerdav commented Apr 29, 2024

Glad that you found a solution!

@joerdav joerdav closed this as completed Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants