PLEASE HELP! npm run Build
Unanswered
American Crocodile posted this in #help-forum
American CrocodileOP
I have just started learning Next.js but I tried npm run build because I saw you can also use that but now I cant use next, nothing loads or updates any more, how do I undo Build mode
2 Replies
Chum salmon
What are you trying to do?
You run
During development, you should run
You run
next start
after npm run build
to open the app. All the changes after this will not update unless you run npm run build
again.During development, you should run
npm run dev
to get smooth update and only run build and run start when you wanna see production build.Chum salmon
Concluesion:
- use it during development (while ur building the app)
- fast refresh (hot reload) & live updates
- slower performance because it's not fully optimized
- optimized version so it's faster
- no hot reload
- you can't see changes without rebuilding again and run start again.
npm run dev
- use it during development (while ur building the app)
- fast refresh (hot reload) & live updates
- slower performance because it's not fully optimized
npm run build
+ next start
(or npm run start
)- optimized version so it's faster
- no hot reload
- you can't see changes without rebuilding again and run start again.