How to Install Node.js & Npm on Cpanel

How to Install Node.js & Npm on Cpanel


shared hosting npm

Hey Folk, This is a small setup guide on installing nodejs and npm package manager on your shared hosting cpanel account. And just to let you know that some hosting providers provide the nodejs setup application on your cpanel account and some don’t. So ask your hosting provider to enable it if you don’t see the nodejs setup installer in your Cpanel account.

Step#1: Go to your cpanel account and click on Setup Nodejs App
Step#2: Click on Create Application and fill out the details to your desired directory for nodejs to be installed and a url link to the directory and create a file app.js . Node js is installed
Step#3: For npm, go to the project folder to create a file named “Package.json” with the following content:
{
“name”: “app”,
“version”: “1.0.0”,
“description”: “My Application”,
“main”: “app.js”,
“scripts”: {
“tests”: “echo ” Error: no test specified ” && exit ”
},
“author”: “Shahzada”,
“license”: “ISC”
}

Step#4: Go back to your setup Node js in cpanel and edit your nodejs application.

Step#5: There you would find a button to install npm. click it and you have your npm installed as well.

LIKE & SUBSCRIBE TO MY CHANNEL.

Background Music:

2 thoughts on “How to Install Node.js & Npm on Cpanel

Leave a Reply

Your email address will not be published. Required fields are marked *