Next.js Discord

Discord Forum

Uncaught SyntaxError: Unexpected end of input

Unanswered
Shayokh posted this in #help-forum
Open in Discord
Hello. I just built and deployed my app on Mellow Host using CPanel. The app loads very slowly and images often don't load properly until I refresh a while.

The biggest issue is that the javascript is not working at all. Buttons, tabs or anything with javascript attached is not responding.

All I have in the console is this error. What to do now?

21 Replies

The app runs like butter locally and I confident that my code is highly minimal and lightweight. Also, the images have compressed before deployment
Is it a standalone server?
Or just a normal build
Normal build
It is like a corrupted file issue or something during build?
I wouldn’t really recommend using cPanel with nextjs as it’s not uncommon to face into issues like this.

If you use a standalone server or a custom server, I think it should work better with cPanel.

Is there any specific guide which you followed to deploy to cPanel?
I am confident the deployment and nodejs app creation is valid
I have done it before
But only this time, one of the javascript files seems broken
Let me try rebuilding and reuploading
I also faced a similar issue when deploying an app to cPanel.

I just cancelled the subscription on the same day. My recommendation is $4 Hetzner VPS or cloudflare workers/aws with open next.


Check this also: https://discord.com/channels/752553802359505017/843997308616966145/1240659614144528394
@Anay-208 | Ping in replies Did you upgrade version?
How to upgrade?
@Shayokh How to upgrade?
No, I mean if you upgrade version of next this issue can happen
I am using Next 15.2.1
Or did you make any change like installing some dependency like sentry, which can sometimes cause build issues
Nope
Can you just try reuploading then
You know what, let me try rebuilding