Cant compile my nextjs project
Answered
Smooth Fox Terrier posted this in #help-forum
Smooth Fox TerrierOP
So when i run
All i get is
Eternal compiling. It never goes beyond the compiling message.
npm run devAll i get is
> my-app@0.1.0 dev
> next dev --turbopack
▲ Next.js 15.0.3 (Turbopack)
- Local: http://localhost:3000
✓ Starting...
✓ Ready in 8.2s
○ Compiling / ...Eternal compiling. It never goes beyond the compiling message.
37 Replies
Smooth Fox TerrierOP
I am very new to nextjs and npm in general so i dont really know how to debug the issue. Would love some assistance as i realize that im not really providing a lot of information here
@Smooth Fox Terrier So when i run
`npm run dev`
All i get is
> my-app@0.1.0 dev
> next dev --turbopack
▲ Next.js 15.0.3 (Turbopack)
- Local: http://localhost:3000
✓ Starting...
✓ Ready in 8.2s
○ Compiling / ...
Eternal compiling. It never goes beyond the compiling message.
did you try it without turbo flag?
Answer
Smooth Fox TerrierOP
ill try it
give me a sec
that works!
however its taking a good 1 min for everything to work. Not sure how painfull the creation of application is going to be when it takes so long
npm run dev
> my-app@0.1.0 dev
> next dev
▲ Next.js 15.0.3
- Local: http://localhost:3000
✓ Starting...
✓ Ready in 9.1s
○ Compiling / ...
✓ Compiled / in 8.4s (654 modules)
GET / 200 in 8788msnot really a min but a while
@Smooth Fox Terrier
npm run dev
> my-app@0.1.0 dev
> next dev
▲ Next.js 15.0.3
- Local: http://localhost:3000
✓ Starting...
✓ Ready in 9.1s
○ Compiling / ...
✓ Compiled / in 8.4s (654 modules)
GET / 200 in 8788ms
yea in your case it took 9.1s to be ready. The compiles after the first compile should be waaaaay faster. But you can still reduce the time by having less to compile
Smooth Fox TerrierOP
takes the same time for each time i run the app
is there a setting im missing here or something?
> my-app@0.1.0 dev
> next dev
▲ Next.js 15.0.3
- Local: http://localhost:3000
✓ Starting...
✓ Ready in 8.8s
○ Compiling / ...
✓ Compiled / in 1432ms (613 modules)
GET / 200 in 1836ms> my-app@0.1.0 dev
> next dev
▲ Next.js 15.0.3
- Local: http://localhost:3000
✓ Starting...
✓ Ready in 9.9s
○ Compiling / ...
✓ Compiled / in 7.5s (654 modules)
GET / 200 in 7930msall different times
as said:
The compiles after the first compile should be waaaaay faster.
Smooth Fox TerrierOP
yeah but all of these is just starting the app after the first compile
@Smooth Fox Terrier yeah but all of these is just starting the app after the first compile
yes, keep in mind that it will be compiled during runtime in dev mode. Later (in production) it wil be way faster by default because it's already compiled
Smooth Fox TerrierOP
so i cant get it faster? i have to restart and wait everytime i make an edit to the app?
untill i build it for prod
@Smooth Fox Terrier so i cant get it faster? i have to restart and wait everytime i make an edit to the app?
no, you can leverage [the fast refresh](https://nextjs.org/docs/architecture/fast-refresh) to recompile it way faster without restarting over and over again
Smooth Fox TerrierOP
its not refreshing for me
if i edit the content, it isnt recompiling or editing the content of the app
@Smooth Fox Terrier if i edit the content, it isnt recompiling or editing the content of the app
you also need to save the file
Smooth Fox TerrierOP
yeah i have
Smooth Fox TerrierOP
This is in my page.js
export default function Home() {
return (
<h1>test</h1>
);
}and if i want it to update, after running
npm run dev i need to stop my server, and use the command againelse
nothing happends
what IDE are you using?
Smooth Fox TerrierOP
visual studio code with auto save enabled
@Smooth Fox Terrier visual studio code with auto save enabled
take a look at this: https://codesandbox.io/p/devbox/boring-beaver-xn54j6
As you can see, when you update the
As you can see, when you update the
Helllo to another value and saving the file (STRG/CTRL + S) it updates within ~500msSmooth Fox TerrierOP
i mean its not even updating when im refreshing the website
so there got to be some issue deeper here
@Smooth Fox Terrier so there got to be some issue deeper here
it looks like this has nothing to do with nextjs, as it works fine with the reproduction that I just shared. So take a look at your IDE enviorement, test different things out, ...
If you still believe this is nextjs related share a reproduction that shows the error via github or [codesandbox](https://codesandbox.io/)
If you still believe this is nextjs related share a reproduction that shows the error via github or [codesandbox](https://codesandbox.io/)
Smooth Fox TerrierOP
alr thanks for the help
happy to help