On Next.js , Why does "npm run dev" command starting on "ready" and stop immediately?

Viewed 29

I installed the default Next.js project usnig the npx create-next-app@latest command on my Windows terminal.

That is the package.json it created for me:

{
  "name": "my-app",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "dev": "next dev",
    "build": "next build",
    "start": "next start",
    "lint": "next lint"
  },
  "dependencies": {
    "next": "12.3.0",
    "react": "18.2.0",
    "react-dom": "18.2.0"
  },
  "devDependencies": {
    "eslint": "8.23.1",
    "eslint-config-next": "12.3.0"
  }
}

Now when I am running npm run dev I get this:

C:\Users\bena2\OneDrive\שולחן העבודה\test1\my-app>npm run dev
npm WARN config global --global, --local are deprecated. Use --location=global instead.

my-app@0.1.0 dev
next dev

ready - started server on 0.0.0.0:3000, url: http://localhost:3000

C:\Users\bena2\OneDrive\שולחן העבודה\test1\my-app>

The problem here is that it shuts itself after about 2 seconds, help me please.

0 Answers
Related