Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

waiting for framework port 3000 #4942

Closed
aigulog opened this issue Aug 13, 2022 · 18 comments
Closed

waiting for framework port 3000 #4942

aigulog opened this issue Aug 13, 2022 · 18 comments
Labels
type: bug code to address defects in shipped code

Comments

@aigulog
Copy link

aigulog commented Aug 13, 2022

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

@aigulog aigulog added the type: bug code to address defects in shipped code label Aug 13, 2022
@danez
Copy link
Contributor

danez commented Aug 15, 2022

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 danez changed the title Please replace with a clear and descriptive title waiting for framework port 3000 Aug 15, 2022
@cymon1997
Copy link

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

@lucasfontesgaspareto
Copy link

lucasfontesgaspareto commented Aug 24, 2022

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

@cymon1997
Copy link

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

@danez
Copy link
Contributor

danez commented Sep 30, 2022

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

@danez danez closed this as completed Sep 30, 2022
@logemann
Copy link

logemann commented Oct 5, 2022

@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

@danez
Copy link
Contributor

danez commented Oct 5, 2022

@logemann Yes this is reported in #5131 and already actively worked on.

@philr35
Copy link

philr35 commented Nov 28, 2022

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

@wrainbird
Copy link

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

@logemann
Copy link

logemann commented Dec 1, 2022

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.

@wrainbird
Copy link

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.

@alimbolar
Copy link

I am still facing this issue.. any update?

@healthier-vitamins
Copy link

healthier-vitamins commented Feb 1, 2023

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

@Mario8419
Copy link

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

@wrainbird
Copy link

I'm getting this issue again with Astro 3. As it's with Astro 3 + Node 18, I have created a new issue here:
#5978

@HamzaMateen
Copy link

HamzaMateen commented Dec 5, 2023

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

@naticio
Copy link

naticio commented Apr 15, 2024

also facing this issue with expo apps

@lucasfontesgaspareto
Copy link

also facing this issue with expo apps

are you hosting your expo app on netlify? 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug code to address defects in shipped code
Projects
None yet
Development

No branches or pull requests