rstudio / blogdown

Create Blogs and Websites with R Markdown
https://pkgs.rstudio.com/blogdown/
1.74k stars 331 forks source link

Unable to serve site after updates #744

Closed dayabin closed 1 year ago

dayabin commented 1 year ago

Howdy,

Thanks for clicking in. I made my website with blogdown and hugo. After a regular check of the release note in wowchemy, I updated the go.mod file and the config.yaml file (with the latest module). However, the site won't serve after the updates.

Please see my go.mod and config.yaml below. The complete package of files can be found in github

module github.com/wowchemy/starter-hugo-academic

go 1.15

require (
  github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy-plugin-netlify-cms
  github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy-plugin-netlify
  github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy/v5
)
module:
imports:
       - path: github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy-plugin-netlify-cms
      - path: github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy-plugin-netlify
      - path: github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy/v5

After I clicked the "Serve Site" button in RStudio, I got error messages saying

Launching the server via the command:
  hugo.exe server --bind 127.0.0.1 -p 4321 --themesDir themes -D -F --navigateToChanged
Error: go: errors parsing go.mod:
C:\work\PersonalWebsite\mywebsite\go.mod:6:3: usage: require module/path v1.2.3
C:\work\PersonalWebsite\mywebsite\go.mod:7:3: usage: require module/path v1.2.3
C:\work\PersonalWebsite\mywebsite\go.mod:8:3: usage: require module/path v1.2.3
Error: failed to download modules: failed to execute 'go [mod download]': failed to execute binary "go" with args [mod download]: go: errors parsing go.mod:
C:\work\PersonalWebsite\mywebsite\go.mod:6:3: usage: require module/path v1.2.3
C:\work\PersonalWebsite\mywebsite\go.mod:7:3: usage: require module/path v1.2.3
C:\work\PersonalWebsite\mywebsite\go.mod:8:3: usage: require module/path v1.2.3
 *errors.errorString

Any ideas??? Thank you for the help.

yihui commented 1 year ago

Error: go: errors parsing go.mod:

This sounds like a go problem irrelevant to blogdown.

For blogdown users, we don't recommend wowchemy themes. If you have to use them, we recommend that you don't upgrade if you have got a working site.

BTW, our team is currently on vacation, so we can't help much until Jan 3 next year.

dayabin commented 1 year ago

OK. Thanks for the responses. Following the error messages, I added the version of the module.

module github.com/wowchemy/starter-hugo-academic

go 1.15

require (
    github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy-plugin-netlify v1.0.0 // indirect
    github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy-plugin-netlify-cms v1.0.0 // indirect
    github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy-plugin-reveal v1.0.0 // indirect
    github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy/v5 v5.7.1-0.20221127215619-58b270a3e103
)

However, new messages occurred saying unknown revision modules/wowchemy-plugin-netlify/v1.0.0.

Thanks for your advice on upgrading. I would be very much obliged if you could help me with this issue (after the holiday ends). But if this is out of your domain, it's OK.

yihui commented 1 year ago

Again, I think this is a go issue instead of blogdown. I know nothing about go, and I'm really unable to help you with that. Sorry.

dayabin commented 1 year ago

Thanks again for the responses!

dayabin commented 1 year ago

The problem was solved by placing a line of code (see below) in the config.yaml file.

module:
  proxy: https://goproxy.cn
yihui commented 1 year ago

Thanks for sharing the solution!