πŸžν”„λ‘œκ·Έλž˜λ°/Next.js

[정보] next.js localhost:3000 접속 λΆˆκ°€

TwoIceFish 2023. 7. 22. 10:54

 

해결방법

ν”„λ‘œμ νŠΈ ν΄λ”μ•ˆμ˜ .next νŒŒμΌμ„ μ‚­μ œν•˜κ³  npm run dev μˆ˜ν–‰

원인섀λͺ…

next.js에 처음 μž…λ¬Έν•˜κ³  intellijλ₯Ό ν†΅ν•΄μ„œ μƒ˜ν”Œ ν”„λ‘œμ νŠΈλ₯Ό dev둜 μ‹€ν–‰ν•˜κ³ μž ν–ˆλ‹€. 그런데 λ‚˜λŠ” http://localhost:3000μ—μ„œ μ„œλ²„κ°€ μ‹€ν–‰λ˜μ—ˆλ‹€λŠ” λ©”μ‹œμ§€λ§Œ ν™•μΈν•˜κ³  잘 λ˜μ—ˆλ‚˜ 보닀라고 ν•˜κ³  μ‹€ν–‰ν–ˆλ‹€.

κ·ΈλŸ¬λ‚˜ 접속이 λΆˆκ°€ν•˜μ˜€λ‹€. μ™œλƒν•˜λ©΄ μ •μƒμ μœΌλ‘œ μ„œλ²„κ°€ 올라였렀면 μœ„μ˜ 사진과 같이 λ‹€ λ‚˜μ™€μ•Όν•˜λŠ” 것이닀.

μ–΄μ©Œλ‹€ λ³΄λ‹ˆ powershell λ˜λŠ” μƒˆλ‘œμš΄ ν”„λ‘œμ νŠΈμ—μ„œ 잘 λ˜λŠ” 것을 보아 λ„ˆλ¬΄ μ˜μ•„ν•΄ ν–ˆλ‹€ 그러던 와쀑에 ν•΄κ²° 법을 μ°Ύμ•˜λ‹€. λ°”λ‘œ ν”„λ‘œμ νŠΈ ν΄λ”μ•ˆμ˜ .next νŒŒμΌμ„ μ‚­μ œν•˜κ³  npm run dev μˆ˜ν–‰ν•˜λ©΄ λ˜λŠ” 것이닀.

 

 

https://stackoverflow.com/questions/73172827/localhost3000-front-end-not-loading-on-nextjs-app
 

localhost:3000 front end not loading on NextJS app

New React developer here. I have an eCommerce application I've been working through (Strapi backend, Next frontend), I'm having a lot of trouble when it comes to loading the front end on localhost....

stackoverflow.com