I created the next app using the command npx create-next-app@latest myapp
But then when I run the comman npm run dev
the development server is not starting. It is struck here
enter image description here
I am pretty sure that I am inside my working directory when i run the command npm run dev
Also this is my package.json file
{
"name": "myapp",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
},
"dependencies": {
"autoprefixer": "10.4.15",
"eslint": "8.48.0",
"eslint-config-next": "13.4.19",
"next": "13.4.19",
"postcss": "8.4.28",
"react": "18.2.0",
"react-dom": "18.2.0",
"tailwindcss": "3.3.3"
}
}
3
Answers
Next development server is already started. You just have to open http://localhost:3000/ in your browser.
It is already running on port 3000 localhost check the 5th line of the image you posted
Your server is started just open your browser and navigate to : http://localhost:3000/
if you want that your project open the browser directly after running the server just add the following open script to package.json (I tested in Windows 10 & 11):
or for windows, linux and also WSL: