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

Hugo Local Build Failing #320

Open
raj-patra opened this issue Jun 22, 2024 · 1 comment
Open

Hugo Local Build Failing #320

raj-patra opened this issue Jun 22, 2024 · 1 comment

Comments

@raj-patra
Copy link

raj-patra commented Jun 22, 2024

Resynced my fork after many months and rebased and squashed my changes to make the commit tree neater.
Now I cannot build after npm install

hugo mod tidy and hugo server -w gives the following error:

go: github.com/hugo-toha/toha/[email protected]: invalid version: git ls-remote -q origin in C:\Users\Raj P\AppData\Local\hugo_cache\modules\filecache\modules\pkg\mod\cache\vcs\3cb566cfd171305ed51f5847660e8d04cf501c2ca92f1cf32f2336acf1eb47a2: exit status 128:
        fatal: 'origin' does not appear to be a git repository
        fatal: Could not read from remote repository.

        Please make sure you have the correct access rights
        and the repository exists.
hugo: collected modules in 931 ms
Error: failed to load modules: failed to download modules: failed to execute 'go [mod download -modcacherw]': failed to execute binary "go" with args [mod download -modcacherw]: go: github.com/hugo-toha/toha/[email protected]: invalid version: git ls-remote -q origin in C:\Users\Raj P\AppData\Local\hugo_cache\modules\filecache\modules\pkg\mod\cache\vcs\3cb566cfd171305ed51f5847660e8d04cf501c2ca92f1cf32f2336acf1eb47a2: exit status 128:
        fatal: 'origin' does not appear to be a git repository
        fatal: Could not read from remote repository.

        Please make sure you have the correct access rights
        and the repository exists.
 *errors.errorString

Here's the content of my go.mod file

module github.com/raj-patra/raj-patra.github.io

go 1.21

require github.com/hugo-toha/toha/v4 v4.5.1-0.20240601184722-8599c634e39f // indirect

// replace(
//     github.com/hugo-toha/toha/v4 => ../toha
// )

Any help is appreciated.

@BernatBC
Copy link
Contributor

Hi @raj-patra, sorry for the late response. You can try the following commands:

git submodule update --remote
hugo mod get -u ./..
hugo mod tidy
hugo npm pack
npm install

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