Netlify CLI - Waiting for framework port

Hi team,

I’m running into a problem running the CLI and I am not sure how to trace the issue. I am using Netlify CLI to run Astro locally.

◈ Netlify Dev ◈
◈ Ignored general context env var: LANG (defined in process)
◈ Loaded function deepgram_token http://localhost:8888/.netlify/functions/deepgram_token.
◈ Loaded function forms http://localhost:8888/.netlify/functions/forms.
◈ Loaded function live-on-twitch http://localhost:8888/.netlify/functions/live-on-twitch.
◈ Loaded function madgab http://localhost:8888/.netlify/functions/madgab.
◈ Functions server is listening on 50667
◈ Starting Netlify Dev with Astro
yarn run v1.22.19
$ astro dev
  🚀  astro  v1.0.0-rc.2 started in 53ms
  
  ┃ Local    http://localhost:3000/
  ┃ Network  use --host to expose
  
  ▶ This is a  rc  prerelease build
    Feedback? https://astro.build/issues
  
⠸ Waiting for framework port 3000. This can be configured using the 'targetPort' property in the netlify.toml

Only it hangs, waiting for port 3000 forever.

I adjusted Astro’s port, and I have changed the targetPort to match. The result is the same.

◈ Netlify Dev ◈
◈ Ignored general context env var: LANG (defined in process)
◈ Loaded function deepgram_token http://localhost:8888/.netlify/functions/deepgram_token.
◈ Loaded function forms http://localhost:8888/.netlify/functions/forms.
◈ Loaded function live-on-twitch http://localhost:8888/.netlify/functions/live-on-twitch.
◈ Loaded function madgab http://localhost:8888/.netlify/functions/madgab.
◈ Functions server is listening on 50322
◈ Starting Netlify Dev with Astro
yarn run v1.22.19
$ astro dev --port 3001
  🚀  astro  v1.0.0-rc.2 started in 63ms
  
  ┃ Local    http://localhost:3001/
  ┃ Network  use --host to expose
  
  ▶ This is a  rc  prerelease build
    Feedback? https://astro.build/issues
  
⠏ Waiting for framework port 3001. This can be configured using the 'targetPort' property in the netlify.toml

It feels like a me problem. My colleagues have been using Netlify CLI for this project while I’ve been starting the dev server with yarn. This issue isn’t happening to them.

1 Like

It appears this might be a Netlify CLI issue related to Node 18. I raised this in the Astro discord. Link to the thread: Discord

Using Node 16 resolves this issue.

1 Like

Is that the only option?

I mean I need Node18 (for fetch compatibility) but I would like to resolve this issue as I am facing it as well…

Any ideas?

CLI works on Node 18 for quite some time now. Are you sure it’s not working for you?

Thanks for the response @hrishikesh

I’ve opened a new ticket for this… Netlify dev hangs with 'Waiting for framework port 3000. This can be configured using the 'targetPort' property in the netlify.toml' message - #3 by alimbolar

And the issue is with just one site… so I don’t really think it’s the CLI but I am not sure how to debug if the issue is with the code… any idea on how I could do this?

Hi @alimbolar unfortunately debugging code is outside the scope of the support. If you still need help please share your repo so other forums users can help debug.

Here is a support guide that can help.

Thanks for the update…:-)…

I have managed to figure out what could be causing the issue but I can’t really understand why…

I’ve created a repo with the bare minimum to replicate the issue. I have a fetchPosts function in the ./lib/api.js and when I call it (it’s the only thing I am doing) it recreates this issue…

Here’s the repo on github

Here’s the site on netlify
https://why-does-the-cli-hang.netlify.app/

I’ve added this same message on my other post ( Netlify dev hangs with 'Waiting for framework port 3000. This can be configured using the 'targetPort' property in the netlify.toml' message)… my apologies if this is not the right thing to do (duplicate messages) but I wasn’t sure which one would be read and which one ignored…

Regards,
Alim

I’ll check out that thread and reply to that once I get to that one (in queue).

UPDATE: As I see, that’s already answered.

1 Like