Netlify dev stuck on "Waiting for localhost", using Netlify CMS with Hugo

Hello! I’m at a loss, even after looking through earlier questions. I have a netlifycms site managed through github. Installing netlify to the local repository directory, linking to the site and authorizing with netlify all seems to work. But then when I run netlify dev:

Johnnies-iMac:hugo-cms johnnieblack$ netlify dev
◈ Netlify Dev ◈
◈ Starting Netlify Dev with hugo
Waiting for localhost:1313.Johnnies-iMac:hugo-cms johnnieblack$

And it just stays that way forever. I never get a “ready” message. Any tips? I’ve tried the suggestions in the post “stuck on waiting for local host”. I get the same result. If it helps, I’m on Mac OS 10.14.5. You can see my repository here: GitHub - GuzhengAlive/hugo-cms

Thank you for any help you can offer!

not sure. i am not super familiar with hugo. would need help debugging this one. would start at netlify-dev-plugin/hugo.js at master · netlify/netlify-dev-plugin · GitHub - it is clearly detecting correctly, but some setting or other is causing an issue in commands/dev/index.js

Thank you swyx. I’m afraid I don’t know enough to troubleshoot the js files. I tried setting up netlify dev for this repository on a windows 10 machine and ran into the same issue. I did see that the Netlify CMS/hugo readme says to start a server with “npm start” which does work. I’ll use that for the meantime. Thank you for taking a look.

Hi @GuzhengAlive, glad you found a workaround. If you do try netlify dev again and still run into the issue, please do consider filing a netlify-dev-plugin issue. Thank you!

Bit of a late response; sorry!

Just had the same issue on a freshly installed Mac - and was solved by installing hugo (’brew install hugo’).

In short Netlify’s build detector has correctly identified the right generator - hugo - but as hugo is not installed on the local machine Netlify-dev can’t execute that local command and so falls over…albeit without a very helpful error message.

TLDR: If things get stuck on port 1313 it usually means Hugo has fallen over rather than Netlify.

2 Likes

thanks for posting that - this is super helpful!

1 Like