Skip to main content

How to Use Angular CLI Node Modules on Cloudways

Learn how to install and use Angular CLI node modules on Cloudways for managing Angular applications, dependencies, and build processes efficiently.

Written by Syed Abuzar Mehdi

This guide will assist you in the process of using the Node module on Cloudways. We are going to use angular@cli.

All the node modules that you will install on Cloudways will be installed locally in your application.

You could set the relevant path in your server for allowing you to install node modules in the application.

You can install these modules in your public_html directory.

First, we set the path and configure the npm_config in the application folder.

Read here to learn how to connect with SSH via master credentials.


How to Use Angular CLI Node Modules on Cloudways

Step #1

  • Login to your server and run these commands:

1: cd && echo "export PATH='$PATH:/home/master/bin/npm'" >> .bash_aliases

2: cd ~ && echo "export NODE_PATH='$NODE_PATH:/home/master/bin/npm/lib/node_modules'" >> .bash_aliases

3: npm config set prefix "/home/master/bin/npm/lib/node_modules"

These commands are necessary for any node module you want to install in your application.

Otherwise if you run npm commands without setting path, it will give you Permission denied errors

Step #2

Choose the application, go into its public_html directory:

cd applications/<application_name>/public_html

To install angular@cli locally, run the following command:

1: npm install @angular/cli


That’s it! We hope this article was helpful.

Need Help?

If you need assistance, feel free to:

We're here 24/7 to help you!

Did this answer your question?