cli icon indicating copy to clipboard operation
cli copied to clipboard

waiting for framework port 3000

Open moekitano opened this issue 2 years ago • 5 comments

Describe the bug

  • Behavior I can't run netlify dev because it says it is waiting for framework port 3000.

Waiting for framework port 3000. This can be configured using the 'targetPort' property in the netlify.toml◈ Command failed with exit code 1: npm run start. Shutting down Netlify Dev server

Steps to reproduce

  1. sudo npm install
  2. sudo netlify dev

Configuration

No response

Environment

netlify-cli 10.17.4

moekitano avatar Aug 13 '22 03:08 moekitano

Are you using node 18? If so try to use node 16 for now, this should fix it. We are working on this, see #4845.

danez avatar Aug 15 '22 10:08 danez

Hi @danez , I'm using node v16.6.1 and still get the same Waiting for framework issue. Please help. Thanks!

cymon1997 avatar Aug 21 '22 12:08 cymon1997

Guys, using netlify dev --targetPort 5173 works for me image

lucasfontesgaspareto avatar Aug 24 '22 23:08 lucasfontesgaspareto

Oh @lucasfontesgaspareto I found out that the issue is when you use svelte runner (when choose these options) image

Will not work if using Svelte image

But, will work perfectly when using Vite image

cymon1997 avatar Aug 25 '22 02:08 cymon1997

These issues should be fixed now as of version 12.0.2. If it still appears please reopen with an example.

danez avatar Sep 30 '22 09:09 danez

@danez still get this with: netlify-cli/12.0.6 darwin-arm64 node-v16.14.2

  VITE v3.1.3  ready in 162 ms

  ➜  Local:   http://127.0.0.1:5173/
  ➜  Network: use --host to expose
⠇ Waiting for framework port 3000. This can be configured using the 'targetPort' property in the netlify.toml

only fix is: netlify dev --targetPort 5173

logemann avatar Oct 05 '22 13:10 logemann

@logemann Yes this is reported in https://github.com/netlify/cli/issues/5131 and already actively worked on.

danez avatar Oct 05 '22 13:10 danez

For those building Astro.js sites, this fixed it for me.

astro.config.mjs

export default defineConfig({
    adapter: netlify(),
    output: "server",
    server: {
        host: true,
        port: 3000
    }
});

Run command:

netlify dev -c "yarn astro dev" --targetPort 3000

philr35 avatar Nov 28 '22 10:11 philr35

If anyone else is running into this issue with Astro, adding this to netlify.toml fixed the issue for me:

[dev]
    command = "yarn dev"
    framework = "#custom"
    targetPort = 3000

wrainbird avatar Dec 01 '22 02:12 wrainbird

If anyone else is running into this issue with Astro, adding this to netlify.toml fixed the issue for me:

[dev]
    command = "yarn dev"
    framework = "#custom"
    targetPort = 3000

or just update the CLI.

logemann avatar Dec 01 '22 09:12 logemann

If anyone else is running into this issue with Astro, adding this to netlify.toml fixed the issue for me:

[dev]
    command = "yarn dev"
    framework = "#custom"
    targetPort = 3000

or just update the CLI.

I did update the CLI but was still experiencing the issue with astro websites that use svelte.

wrainbird avatar Dec 01 '22 10:12 wrainbird

I am still facing this issue.. any update?

alimbolar avatar Jan 24 '23 02:01 alimbolar

I am still facing this issue.. any update?

i managed to fix it by removing the homepage: "..." from package.json and adding:

[dev]
    command = "npm start"
    targetPort = 3000

in my netlify.toml file i'm using node18 and cra

healthier-vitamins avatar Feb 01 '23 17:02 healthier-vitamins

I am still facing this issue and no solution working for me...any updates on this? I'm just using also the latest CLI version

Mario8419 avatar Apr 13 '23 06:04 Mario8419

I'm getting this issue again with Astro 3. As it's with Astro 3 + Node 18, I have created a new issue here: https://github.com/netlify/cli/issues/5978

wrainbird avatar Sep 04 '23 04:09 wrainbird

Any update on this? I am on the latest Node LTS v21.4.0, and facing this issue.

my netlify.toml features [dev] section as following:

[dev] command = "make serve URL=http://localhost:8888/" framework = "hugo" targetPort = 8888

HamzaMateen avatar Dec 05 '23 18:12 HamzaMateen

also facing this issue with expo apps

naticio avatar Apr 15 '24 19:04 naticio