How to Deploy Next js App on Cpanel | Learn how to host Next js App on Namecheap Hosting Server
HTML-код
- Опубликовано: 3 окт 2024
- Step - 1
Create a Next js App
Step - 2
NPM install & NPM run dev
to sure website work properly
Step - 3
Create a file server.js app root folder
&
package.json file scripts area edit
"start": "NODE_ENV=production node server.js",
Step - 4
NPM build for uploaded in server
Step - 5
zip all the file except node_module
&
unnecessary file
Step - 6
Login Cpanel
create a folder in File manager
then upload zip file in here
last configure Cpanel Node Js
you must change ur title yt with next js page not app, this tutorial is showing about how to deploy next js page router not app. ty
I mean, app router is a different topic. You can still call this NextJs Application despite using next page router lol
What about NUXT project, does this work the same or?
why do you need to create a custom server? couldnt you just use next start?
hello sir i have upload next js app in plesk after followed all step when i hit on
url it showing me coming soon...
503
Service Unavailable
The server is temporarily busy, try again later!
it show this msg in page
When i typ Node the aptions for the Node js setup not showing. Is there any issue in my Cpanel? if yes please guide me how will i slove the issue?
I hope its not late but some cPanels from other hosting companies do not buy Node.js licenses. So like yours chances are that they do not have a node.js license
i take so long for npm run dev in cpannel what is the problem ? it says Can't acquire lock for app: %(app)s
Try it again.
When run npm if it write folder path it must work.
is it just me or run npm install takes forever
It's not working for me. Could you please help me.
Yeah
Is it possible to make SSR in cpanel? You need a VPS server for this, right?
yeas
how do you connect database on cpanel
sir can u dot his same with hostinger panel??? plzz sir make video i am waiting for that. plzz upload today sir
Does it run on NEXT version 14?
yeah
can i deplay with prisma , app router and serveur compenent in cpanel
yes
Dynamic routing won’t' work in cpanel
is that on Namecheap shared hosting? it only renders static sites right or does it run SSR also?
With the way he deployed it, it will run as a Server Side Rendered application.
@@chuksjoe007 thank you, he's using page router though, not app router
please help me bro im getting 503 error
Please first check in locally if everything ok then follow it
How do I run Prisma with nextjs in cpanel? I set the environment variable, but it doesn't recognize it.
No problem. Here node module render your hole application
@@monjuaflame8329 Even though it doesn't run, it doesn't recognize the environment variable. I had to subscribe to a VPS and host the files on the .env file. On a common hosting with cpanel it doesn't work to configure the environment variable.
daynamic possible? example /blog/1
It’s dynamic website
i am getting 503 error anyone help me
Please try again.
@@monjuaflame8329 Thank you so much for your reply but its not working i did as you please help me
missin steps
WTF did you even do?
unclear as hell
Why i always get 503
Same. I always get Error 503. Server Unavailable
you find the solution for this i am also getting 503 error, Please help me
@@DrMoCode you find the solution for this i am also getting 503 error please help me
@@RanjithR-p2r I did
My own case was version incompatibility
The highest node version on the cPanel I was using was way lower than the node version nextjs was built on.
Hi Sir ,
Need a help from you regrading deployment of nextjs in a shared server in cpanel ,
As currently stuck by an issue when trying to run npm start
This is issue i am getting, please help me out
node:internal/deps/undici/undici:9235
return await WebAssembly.instantiate(mod, {
^
RangeError: WebAssembly.instantiate(): Out of memory: Cannot allocate Wasm memory for new instance
at lazyllhttp (node:internal/deps/undici/undici:9235:32)
Node.js v19.9.0
Please try again by following step.
how did you resolve this, I am experiencing the same issue today. I have also written to my hosting provider