Installing Npm, node on a shared hosting plan WITHOUT SSH - node.js

As the title says, I'm trying to install npm, node etc. on a shared plan which doesn't have SSH, running Apache.
Is that possible in any way?
Thanks.

Related

How to install node + vue web program offline

Hey Im looking for a good and solid solution for how to install node + vuejs full stack web program in offline. Our customer can not have any internet access so we have to install it in offline but cant imagine how to do. First idea was copy all the code including node modules and just paste it to the customer’s computer and run it. However I do bot believe this is gonna work.
Customer uses Centos as fas as I know.
Thanks in advance.
Anyone who's looking for a 'how to' steps for offline centOS install.
Preparation
a laptop or Computer can access to the internet.
Install VM or whatever you want to use to set the whole project in CentOS
Install CentOS7 in your VM and connect to the internet.
!! Important!!
You MUST Follow your customer's centOS install options. There are many options you can select when you install your centOS. When you install your project in offline, you have to have all the packages(or dependencies) depends on OS installed options. If your customer installed CentOS as full development package, then you don't have to have additional dependencies. if not, you need a lot.
download all the packages you need as CentOS version. In my case, my web is based on 'Nodejs + Express', 'Vuejs + AntDesign', pm2, nginx so I have donwnloaded nodejs, nginx, and pm2. Others are gonna work without any problems once you've installed Nodejs. If you need some additional packages or dependencies(it will be written in the terminal message during installation process of node or others) then write down all the packages and install them.
Set your project in CentOS and test if it works(build the project if it's needed). If it does not work, check the path, dependencies, or anything else might be related(DO NOT FORGET LINUX AUTHORITY!!).
If everything works, then get all the installation file(.rpm) you've installed.
install another CentOS in VM as OFFLINE
install in offline CentOS .rpm installation files you get from online CentOS above.(no. 6) (DO Exactly same installation but this time, with only the files. not from the online repositories)
Test
If it's not working, check the path, root or user's authority in CentOS.
About PM2.
As PM2 is for the process management, you have to install it globally. However, sometimes(I tested 2 times in exactly same set environments. First try did work but second try didn't work. Couldn't find why. I've tested 4.3 and it works every time so I suggest you to get the pm2 version under 4.5) pm2 v.4.5 or up does not support offline installation with npm so All you have to do in online centos:
npm pack pm2(whatever you've set the name when you installed pm2 in online centos, if you didn't change the package name then npm pack pm2 will work, command path doesn't matter. pm2 is installed globally so when you run npm pack pm2 anywhere it will take global installed pm2 whatsoever) This will pack all the dependencies to install pm2 in offline. Take this packed file(.tgz) and install this in offline.
Test
If it's not working and you couldn't find the reason why, leave a comment or answers down below. I will try to help as much as I can.(I'm Korean and live in Korea. Please be aware of time difference)

Deploy Node.js server on Dreamhost

I am going to deploy Typescript(React) app on the Dreamhost.
But I don't know how to do that.
I can connect by SSH to the server.
Should I install npm by SSH then run that?
I saw an option about passenger on the Dreamhost server.
If I select this check box, then message shows requires VPS or dedicated server running a recent OS version.
But I don't know at all about how to do this. I have been using Dreamhost for only few months.
Please help me.
What requires a VPS or Dedicated server, is the RVM module:
Regarding your question: Node.js is not installed by default on newer DreamHost servers. You must manually install a custom version under your server's username.
Once installed, npm is also installed and you'll be able to run the commands below.
View the following article for instructions on how to install a custom version of Node.js.
Installing a custom version of NVM and Node.js

how come I have so many versions of nodejs?

how come I have so many versions of nodejs.
I have multiple of command prompts applications, I have
1. nodejs cmd
2. ubunto bash cmd
3. my normal cmd
and a bunch of others but I dont use them..
my question is.
1.how do I update my nodejs in my system and be just automatically reflected on all of my cmd's? is that even possible?
2. why is this happening?
3. what cmd should I use for running node applications?
below are the snapshots of cmds and the result that it gave me when I checked the version of node.
Right off the bat, I can tell you that the only nodejs package actually installed globally on your system is the first image you have shown (v6.10.2).
The second image (v6.11.2) came with the nodejs installer. So if you uninstall that application, you will not see it again. Check your PATH variable to make sure.
The third image (v4.2.6) is installed on WSL and therefore lives some place separate from the rest of your windows files and programs. You can use the command apt-get remove --purge nodejs to remove that one.
To answer your question, you cannot have the same nodejs across all systems because as you can see from my answer above, these versions of nodejs live in separate environments which are contained.
I would recommend using the nodejs installation from nodejs.org for running nodejs. This is the same as your second image.
Did you know windows has a package manager? Try chocolatey for managing node versions.
how do I update my nodejs in my system and be just automatically reflected on all of my cmd's?
why is this happening?
You can install node.js globally, you have different versions because you didn't install globally, so your cmds can't be automatically reflected. You can see this blog how to install node.js globally:
How To Install Node.js on Ubuntu 16.04
what cmd should I use for running node applications?
you can run node applications using cmd which you want, it doesn't matter.
You can use nvm to manage and easily switch between node's versions.

EmberJS development on a machine with outdated node version

I have a project where I want to use the latest EmberJS to develop under. Currently, node 0.10.4 is installed on the machine I was given, which is a hard requirement for a backend system that I will need. Since the nodejs is so outdated, I cannot install the latest Ember on this machine without updating the NodeJs. My ember app has to communicate to the backend system through socket.io, is it possible to create a virtual development environment on this machine to develop Ember with the latest nodejs and also be able to easily configure the socket.io connection during development?
I believe once Ember is compiled down to distribution files, I can easily migrate these files into the public folder of my outdated nodejs with no problem, but correct me if I'm wrong
Any ideas on a solution that is easy to configure without asking for a new machine?
The easiest way to handle this situation is to use Node Version Manager (NVM).
Just follow the install instructions located here.
Then you can simply type nvm install <desired version of node>.
For example, when developing your backend system, first type nvm install v0.10.4. And when developing your Ember app, type nvm install v6.0.0.
(Note: to find out what versions of node are available to download, run nvm ls-remote).
If you use Linux - you can do following steps:
create new user
download archive with latest node.js version from here:
extract archive to any folder in new user /home directory
then switch to created user and do echo "export PATH=$PATH:/path/to/your/latest/node/bin/node" >> ~/.bashrc;
Then you should be available to use node.js 7.*.* only for this user, but default version for other users will be 0.10.4

How to install phantom.js in my server

I am having Linux based server on shared hosting from hostgator.I need to install the phantom.js but I couldn't find help anywhere.
You will need to ask HostGator if they will install PhantomJS for you on their shared environment or you can rent a Linux virtual private server and install it yourself.

Resources