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

Fails set-up local development environment #878

Closed
yanboyang713 opened this issue Feb 1, 2024 · 2 comments
Closed

Fails set-up local development environment #878

yanboyang713 opened this issue Feb 1, 2024 · 2 comments

Comments

@yanboyang713
Copy link

Question

I followed the README and set up my local development.

But I got an error when I ran go mod tidy:

yanboyang713@Meta-Scientific-Linux ~/personalblog (git)-[main] % go mod tidy
go: errors parsing go.mod:
go.mod:8:5: replace github.com/yanboyang713/toha: version "v0.0.0-20240201123906-c152a8f852b9" invalid: go.mod has post-v0 module path "github.com/hugo-toha/toha/v4" at revision c152a8f852b9

Everyone knows the reason why.

yanboyang713@Meta-Scientific-Linux ~/personalblog (git)-[main] % cat go.mod
module github.com/hugo-toha/hugo-toha.github.io

go 1.19

require github.com/hugo-toha/toha/v4 v4.1.1

replace(
    github.com/hugo-toha/toha/v4 => github.com/yanboyang713/toha main
)
# Use Hugo modules to add theme
module:
  imports:
  - path: github.com/hugo-toha/toha/v4
  mounts:
  - source: static/files
    target: static/files
  - source: ./node_modules/flag-icon-css/flags
    target: static/flags
  - source: ./node_modules/@fontsource/mulish/files
    target: static/files
  - source: ./node_modules/katex/dist/fonts
    target: static/fonts

Thanks for your help.

@hossainemruz
Copy link
Member

Look like you are missing /v4 in the replace directive. Can you please try changing this in your go.mod file:

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

with

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

@yanboyang713
Copy link
Author

Hello @hossainemruz,

Thanks so much. Resolved.

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