Category: Tech

Long break

Although I wanted to work on ionic things didn’t come the way I intended, I had too many things on my plate, and I cant juggle all at once, so I’ll be taking a long break  to figure things up, and may come back later with new things to share

Best Regards

Filed under: Learning, TechTagged with:

How to install Ionic without using sudo on macOS

The first step for using any tool or platform is installing it.
As a user who had many problems using sudo, I tried to find a way to install ionic without it, found many over the internet but i’ll only list the two that i have tried

The lazy way

1- Install Node Version Manger ( nvm )  use the install script using curl:

curl -o- | bash

the current version of nvm as of today is v0.33.2 , so make sure to verify that you have installed the latest version by executing the following command

nvm --version

But always refer to github to check what is the latest version

2- Install the latest version of nodejs

nvm install node

Make sure that you are using the installed nodejs version by using the following comand

nvm use node

For more information about using nvm visit this link

3- Now you are ready to install cordova and ionic without sudo

npm install -g cordova ionic

By using nvm you are installing nodejs in your user home directory, I find this way simple and easy .The best thing though is that you can have as many node versions as you need on your user account, and no fear that another user would break your work if he upgraded nodejs installed globally on the system .

you can switch between the installed versions easily read the nvm documentation for more information.


The Long way

1- Make a directory for global installations

mkdir ~/.npm-global

2- Create a new file  called .npmrc

touch ~/.npmrc

3- Add the following line to the created file

prefix = ~/.npm-global

4- Depending on the shell you are using add the following line to .bashrc  or  .zshrc

export PATH=~/.npm-global/bin:$PATH

5- Source your   .zshrc  or   .bashrc

source ~/.bashrc  or   source ~/.zshrc

6- Install HomeBrew

/usr/bin/ruby -e "$(curl -fsSL"

7- Instal the latest nodejs

brew install node

8- now you can install cordova and ionic without sudo

npm install -g cordova ionic

This way is long and a bit complicated as you can see, especially if you don’t like messing around with your system files, but still worth it.

and here you go choose the one you like, try it and let me know if you face any issues..


Filed under: Learning, Programming, TechTagged with: , ,


Welcome to my blog

I created this blog to share my learning experience after being away from programming for more than 5 years…  you can read the story here

Coming back to the tech world is hard, especially if you have been away for a long time ,I feel like i am in a new world and need a magic carpet and Aladdin to take me on a ride to discover it …

So lets fasten our belts and start this bumpy adventure …

Enjoy the ride 🙂




Filed under: Learning, Programming, TechTagged with: , , , ,