How to Deploy Next js App on Cpanel | Learn how to host Next js App on Namecheap Hosting Server
Vložit
- čas přidán 9. 12. 2023
- 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 - Věda a technologie
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
why do you need to create a custom server? couldnt you just use next start?
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 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 possible to make SSR in cpanel? You need a VPS server for this, right?
yeas
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
It's not working for me. Could you please help me.
Yeah
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
Does it run on NEXT version 14?
yeah
sir can u dot his same with hostinger panel??? plzz sir make video i am waiting for that. plzz upload today sir
can i deplay with prisma , app router and serveur compenent in cpanel
yes
Dynamic routing won’t' work in cpanel
please help me bro im getting 503 error
Please first check in locally if everything ok then follow it
its not working its just showing index of/ whatever is in the public_html
open node js app and connect right folder.
@@monjuaflame8329 i have donw that now it's showing Error 503. Service Unavailable
@@monjuaflame8329can you help me with this
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
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.
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
@@user-bq6io5vk8i 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.
WTF did you even do?
unclear as hell