Reload issues
Answered
Clinton401 posted this in #help-forum
Whenever I try to reload my website it take a while to load. I don't know if it's my pc or it's normal. I'm new to Nextjs by the way
Answered by Minskin
First close down your current build by pressing: CTRL + C twice in the terminal, then type:
1. 'npm run build'
2. When that's done, do 'npm run start'
@Clinton401
1. 'npm run build'
2. When that's done, do 'npm run start'
@Clinton401
22 Replies
@Clinton401 Whenever I try to reload my website it take a while to load. I don't know if it's my pc or it's normal. I'm new to Nextjs by the way
is this dev mode (
npm run dev) or prod mode (npm start/a deployment on e.g. vercel?)Npm run dev
@Clinton401 Npm run dev
Minskin
That's probably why, I experience the same problem and apparently alot of people do too when working in dev environment. https://stackoverflow.com/questions/76408504/nextjs-13-is-insanely-slow-in-dev-environment
Thanks. Now I understand
But is it fast in production?
Minskin
I just tested, for me it does.
Minskin
First close down your current build by pressing: CTRL + C twice in the terminal, then type:
1. 'npm run build'
2. When that's done, do 'npm run start'
@Clinton401
1. 'npm run build'
2. When that's done, do 'npm run start'
@Clinton401
Answer
Minskin
Here's a link that I used to see how to do it: https://shipsaas.com/blog/how-to-run-next-js-build-locally
Thanks ill try it now
I'll
it has been throwing this error since i've tried using npm run build
uncaughtException Error: kill EPERM
at ChildProcess.kill (node:internal/child_process:512:26)
at ChildProcessWorker.forceExit (C:\Users\clint\Downloads\Coding\Nextjs\glamourglow\node_modules\next\dist\compiled\jest-worker\index.js:1:12879)
at Timeout._onTimeout (C:\Users\clint\Downloads\Coding\Nextjs\glamourglow\node_modules\next\dist\compiled\jest-worker\index.js:1:8684)
at listOnTimeout (node:internal/timers:573:17)
at process.processTimers (node:internal/timers:514:7) {
errno: -4048,
code: 'EPERM',
syscall: 'kill'
uncaughtException Error: kill EPERM
at ChildProcess.kill (node:internal/child_process:512:26)
at ChildProcessWorker.forceExit (C:\Users\clint\Downloads\Coding\Nextjs\glamourglow\node_modules\next\dist\compiled\jest-worker\index.js:1:12879)
at Timeout._onTimeout (C:\Users\clint\Downloads\Coding\Nextjs\glamourglow\node_modules\next\dist\compiled\jest-worker\index.js:1:8684)
at listOnTimeout (node:internal/timers:573:17)
at process.processTimers (node:internal/timers:514:7) {
errno: -4048,
code: 'EPERM',
syscall: 'kill'
@Minskin That's probably why, I experience the same problem and apparently alot of people do too when working in dev environment. https://stackoverflow.com/questions/76408504/nextjs-13-is-insanely-slow-in-dev-environment
That's new to hear but worked on more then 10-12 next js projects of 12-14 but never happen can you just check if its No throttling inn network tab
the error above already has its dedicated post https://nextjs-forum.com/post/1243326363168018563, so i'll consider this post resolved
@Shubham Tarpara That's new to hear but worked on more then 10-12 next js projects of 12-14 but never happen can you just check if its No throttling inn network tab
dev mode is always significantly slower than prod mode, regardless of network throttling
Yeah but not that much it take maximum 10 seconds to load
it depends on many things. i have worked on apps where dev server takes 1 min+ to boot before.
@Clinton401 Thanks. Now I understand
Variegated Flycatcher
Yes
@Minskin That's probably why, I experience the same problem and apparently alot of people do too when working in dev environment. https://stackoverflow.com/questions/76408504/nextjs-13-is-insanely-slow-in-dev-environment
Schneider’s Smooth-fronted Caiman
thank you so much for sharing this. @Minskin u just saved my life lmao
managed to solve the memory leak in my M1 macbook air, by adding
cc: @Clinton401 @joulev in case u guys needed it
managed to solve the memory leak in my M1 macbook air, by adding
swcMinify: true in next configcc: @Clinton401 @joulev in case u guys needed it
@Schneider’s Smooth-fronted Caiman thank you so much for sharing this. <@415517480149057536> u just saved my life lmao
managed to solve the memory leak in my M1 macbook air, by adding `swcMinify: true` in next config
cc: <@1008558671573307542> <@484037068239142956> in case u guys needed it
Minskin
Wow, been a while since I posted that. Glad it helped 

👍