Http://locahost:1313 renders Page Not Found

Hello. My HUGO website was working find locally up until after I deployed it to Netlify. I’ve scoured the forum, and StackOverflow, and nothing of what’s been proposed has worked so far. The website works fine, even after I’ve blindly pushed changes–since I can’t check locally. I’m using the congo theme, and followed its documentation to a T.

When I run hugo server -D

Start building sites …
hugo v0.110.0+extended darwin/arm64 BuildDate=unknown
WARN 2023/02/14 21:54:48 found no layout file for "HTML" for kind "home": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2023/02/14 21:54:48 found no layout file for "HTML" for kind "section": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2023/02/14 21:54:48 found no layout file for "HTML" for kind "taxonomy": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2023/02/14 21:54:48 found no layout file for "HTML" for kind "taxonomy": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2023/02/14 21:54:48 found no layout file for "HTML" for kind "page": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2023/02/14 21:54:48 found no layout file for "HTML" for kind "page": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2023/02/14 21:54:48 found no layout file for "JSON" for kind "home": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.

                   | EN
-------------------+-----
  Pages            |  5
  Paginator pages  |  0
  Non-page files   |  2
  Static files     |  0
  Processed images |  0
  Aliases          |  0
  Sitemaps         |  1
  Cleaned          |  0

Built in 11 ms
Watching for changes in /portfolio/{archetypes,assets,content,data,layouts,static}
Watching for config changes in /portfolio/config/_default, /portfolio/go.mod
Environment: "development"
Serving pages from memory
Running in Fast Render Mode. For full rebuilds on change: hugo server --disableFastRender
Web Server is available at http://localhost:1313/ (bind address 127.0.0.1)
Press Ctrl+C to stop

When I run hugo server --verbose

INFO 2023/02/14 21:57:27 syncing static files to / 

…the rest is the same as when I ran hugo server -D

When I run hugo server --theme=congo

Error: module "congo" not found; either add it as a Hugo Module or store it in "/portfolio/themes".: module does not exist

Here’s my hugo env info & git version

hugo v0.110.0+extended darwin/arm64 BuildDate=unknown
GOOS="darwin"
GOARCH="arm64"
GOVERSION="go1.19.5"
github.com/sass/libsass="3.6.5"
github.com/webmproject/libwebp="v1.2.4"
git version 2.39.2

I double-checked that my PORT wasn’t being used on something else, and it was not. I’m at a loss as to what it could be, or what/where I messed up. My repo is here: Emme Bravo / portfolio · GitLab

Thank you so much for your support!

You don’t seem to have a layouts folder or a themes folder?

Locally, those folders have always been empty, but the website still showed up locally. When I uploaded to GitLab, to deploy to Netlify, those folders didn’t upload, but the website still works lol

It would be helpful to have access to the repository.

I linked the repo at the bottom of the post.

When I do this…

git clone --recurse-submodules https://gitlab.com/emmebravo/portfolio
cd portfolio/
hugo

…your site builds without errors.

That’s what confuses me :sob: locally it doesn’t work, but if I push changes, it’s fine

What happens if you do what I did, cloning into a temporary directory to test?

git clone --recurse-submodules https://gitlab.com/emmebravo/portfolio
cd portfolio/
hugo

Hello. Apologies for not replying. I’ve been dealing with ISP issues all day and it’s still not working. I’m hoping by tomorrow I can give your idea a shot. I’ll let you know :slight_smile: Thank you!

Hi Joe, I did what you suggested, and it doesn’t build with errors, but I also don’t see the build.

I ran hugo server -D and finally got an error:

$ hugo server -D
go: github.com/jpanther/congo/v2@v2.5.2: reading github.com/jpanther/congo/go.mod at revision v2.5.2: git ls-remote -q origin in /var/folders/_9/sh0q476s25l2gs6wmvm4j49c0000gn/T/hugo_cache/modules/filecache/modules/pkg/mod/cache/vcs/066af87f3ece5bb7d6b6b53ce98f8b34566e9be8285986a3e33bbfe82661fac4: 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 950 ms
Error: failed to download modules: failed to execute 'go [mod download]': failed to execute binary "go" with args [mod download]: go: github.com/jpanther/congo/v2@v2.5.2: reading github.com/jpanther/congo/go.mod at revision v2.5.2: git ls-remote -q origin in /var/folders/_9/sh0q476s25l2gs6wmvm4j49c0000gn/T/hugo_cache/modules/filecache/modules/pkg/mod/cache/vcs/066af87f3ece5bb7d6b6b53ce98f8b34566e9be8285986a3e33bbfe82661fac4: 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
git clone https://gitlab.com/emmebravo/portfolio emmebravo-portfolio

folllowed by

cd emmebravo-portfolio
hugo server -D

works perfectly for me:

hugo: downloading modules …
hugo: collected modules in 4100 ms
Start building sites … 
hugo v0.110.0-e32a493b7826d02763c3b79623952e625402b168+extended linux/amd64 BuildDate=2023-01-17T12:16:09Z VendorInfo=gohugoio

                   | EN  
-------------------+-----
  Pages            | 13  
  Paginator pages  |  0  
  Non-page files   |  2  
  Static files     |  7  
  Processed images |  7  
  Aliases          |  1  
  Sitemaps         |  1  
  Cleaned          |  0  

Built in 1121 ms
Watching for changes in /home/daniel/Build/misc/emmebravo-portfolio/{archetypes,assets,content}
Watching for config changes in /home/daniel/Build/misc/emmebravo-portfolio/config/_default, /home/daniel/Build/misc/emmebravo-portfolio/go.mod
Environment: "development"
Serving pages from memory
Running in Fast Render Mode. For full rebuilds on change: hugo server --disableFastRender
Web Server is available at http://localhost:1313/ (bind address 127.0.0.1)
Press Ctrl+C to stop

There are three things I can think of:

  1. I use HUGO_CACHEDIR=/var/local/hugo-cache-dfd since there is an issue where sometimes the OS will delete files from the default Hugo cache dir ($TMPDIR/hugo_cache) during a periodic cleanup of $TMPDIR.
  2. You (or your ISP) may have some proxy (or you may have GOPROXY set) so that you are not getting direct access to the GitHub repository for the theme (https://github.com/jpanther/congo)
  3. The version of Go installed on your computer may be too old. (reread your original post).

Actually a fourth one: Do you use HUGO_MODULE_REPLACEMENTS at all?

I did notice you are using the arm64 build. What hardware and OS?

2 Likes

And one more to add to @cshoredaniel’s suggestions:

go clean -modcache
2 Likes

A few people have run into this on macOS.

1 Like

Apple M1, macOS Ventura 13.0.1

I am on a macOS ><

I’ve been able to look at past examples of similar issues.

thank you @cshoredaniel && @jmooring. Adding HUGO_CACHEDIR in my OS env solved the issue :smiling_face:

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.