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

Could not analyze the repository: [...]: malformed module path: missing dot in first path element #426

Open
ndewet opened this issue Jun 24, 2024 · 6 comments

Comments

@ndewet
Copy link

ndewet commented Jun 24, 2024

I've attempted to add the Go Report Card to my project https://github.com/ndewet/microx, but I have encountered the following error:

There was an error processing your request: Could not analyze the repository: could not download repo: could not get latest module version from https://proxy.golang.org/microx/@latest: bad request: invalid escaped module path "microx": malformed module path "microx": missing dot in first path element

When visiting https://goreportcard.com/report/github.com/ndewet/microx.

I've followed the URL mentioned in the error: https://proxy.golang.org/microx/@latest, which does indeed produce a bad request response.

While I may be mistaken, I believe that the following url is correct: https://proxy.golang.org/github.com/ndewet/microx/@latest

@lordofscripts
Copy link

I too was thinking of adding the Report Card to my README but I got the same error generated on my project:

https://github.com/lordofscripts/govee and there is nothing wrong with my project URL. The project compiles without errors too but the report card generation fails.

@JasonLovesDoggo
Copy link

JasonLovesDoggo commented Jul 15, 2024

I got the same issue. It turns out that proxy.golang.org expects lowercase, should be an easy fix.

https://proxy.golang.org/github.com/JasonLovesDoggo/Katib/@latest fails, yet
https://proxy.golang.org/github.com/jasonlovesdoggo/katib/@latest works just fine

@lordofscripts
Copy link

In my case the solution turned out to be something else. My package was local, published on Github but still I had not github.com/ as prefix. So, in my imports I changed the path from the local version to public version:

"lordofscripts/govee" changed to "github.com/lordofscripts/govee"

And that was it, it was crapping out with "malformed" error because the import path was missing a URL part. After I corrected that the Go Report Card started working. I did notice there is a considerable delay though. After pushing to GitHub invoking the report would still show old data. Apparently it needs some time to propagate.

@lordofscripts
Copy link

Facing same issue with another package. This report card seems to depend on the position of the planets.

@Reimirno
Copy link

In my case the solution turned out to be something else. My package was local, published on Github but still I had not github.com/ as prefix. So, in my imports I changed the path from the local version to public version:

"lordofscripts/govee" changed to "github.com/lordofscripts/govee"

And that was it, it was crapping out with "malformed" error because the import path was missing a URL part. After I corrected that the Go Report Card started working. I did notice there is a considerable delay though. After pushing to GitHub invoking the report would still show old data. Apparently it needs some time to propagate.

Same boat - how long did you have to wait?

@lordofscripts
Copy link

Well, I got no response so I analyzed and tried until this worked.

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

4 participants