zeon-studio / hugoplate

Hugoplate is a free starter template built with Hugo and TailwindCSS that will save you hours of work.
https://zeon.studio/preview?project=hugoplate
MIT License
863 stars 240 forks source link

`npm run update-modules` not working properly #72

Closed jmMeessen closed 10 months ago

jmMeessen commented 10 months ago

As mentioned in https://github.com/zeon-studio/hugoplate/issues/68#issuecomment-1874612105 , the command npm run update-modules fails with go: malformed module path "hugoplate": missing dot in first path element.

I cloned a fresh copy of the hugoplate repo, ran npm run project-setup and then npm install. But the update-modules still fails with the same error 😞

I am using up to date prerequisite I believe:

npm version
{
  hugoplate: '1.10.3',
  npm: '10.2.4',
  node: '21.4.0',
  acorn: '8.11.2',
  ada: '2.7.4',
  ares: '1.23.0',
  base64: '0.5.1',
  brotli: '1.1.0',
  cjs_module_lexer: '1.2.2',
  cldr: '43.1',
  icu: '73.2',
  llhttp: '9.1.3',
  modules: '120',
  napi: '9',
  nghttp2: '1.58.0',
  openssl: '3.2.0',
  simdutf: '4.0.4',
  tz: '2023c',
  undici: '5.28.1',
  unicode: '15.0',
  uv: '1.47.0',
  uvwasi: '0.0.19',
  v8: '11.8.172.17-node.17',
  zlib: '1.2.13.1-motley-5daffc7'
}

Any idea where to search to fix the theme update? Where is the theme module defined ?

tfsomrat commented 10 months ago

hey @jmMeessen, sorry to hear that. can you please tell me which OS you are using?

jmMeessen commented 10 months ago

Thanks for looking into this with me, @tfsomrat

I am using Mac OS Sonoma 14.2.1 (23C71). So rather "run of the mill" I guess.

tfsomrat commented 10 months ago

I am on the same OS, and I have downloaded your repo and tried it on my machine and some other machines. and everything works expectedly. I don't understand why it's not working on your machine.

jmMeessen commented 10 months ago

So we can safely exclude something with the theme's code but rather something on my two laptops.

Just in case, are you using bash or zsh as default shell?

( I will the new update script during my lunch break or tonight. Am on UTC+1)

tfsomrat commented 10 months ago

I am using ZSH, but I tried on default terminal of the mac as well

tfsomrat commented 10 months ago

why don't you try running hugo mod clean --all && hugo mod get -u ./... && hugo mod tidy

jmMeessen commented 10 months ago

This is indeed how I am investigating the issue (that is now confirmed to be a local issue). And the failing download is caused by the hugo mod get... command. Google articles with the error message point to a GO misconfiguration. I checked this and am puzzled as I am able to program in GO (have several programs published). I am investigating a Hugo misconfiguration: up to now I used a containerized Hugo distribution.

I am now a big step forward and know that the problem is local to my two laptops. But still scratching my head....