Why does my Next.JS edit code work (on npm run start)? without new build (on npm run build). I wonder why it is so. Or did I do something wrong?
In nextjs.. if you want to run development server, you have to run
npm run dev
npm run start --> Runs your production build.
Please check your scripts in package.json
// my scripts in package.json
"scripts": { "dev": "next dev -p 5000", "build": "next build", "start": "node server.js", "lint": "next lint" }
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.