In this video.
Let's see how we can install packages globally.
So the same task goes like this npm install and flag does G and the name of the package or you can make
use of NPM II and then the G flag.
So let's see.
So let's go ahead and install a different package called Node one.
And this package help us to rest our server any time we make changes automatically.
So for the meantime, we are going to make use of Node one for now.
As you move on, I will show you.
So this is how it goes.
So npm I and then dash g the name of the package which is called Node.
C'mon, let's hit enter.
Let's see what is going to happen.
Well, as a historian, if you are on Mark, I'm going to ask you permission that we need to enter your
password.
You see that we have what is called access, deny or permission denied, meaning that you need to give
permission before we can install because we are installing this package globally on our operating system.
So if I windows, I'm not sure I'm going to see this kind of message.
So to avoid this, we provide so let me clear the console and let me start again.
Clear the console and this is the command sudo and then npm i dash g the name of the package.
So let's hit enter now it's asking me to enter my password.
So let me go ahead, enter my password and now I enter the wrong password.
So let me try again.
And now I can see that is now installing Nordman globally on my operating system.
So after installing we see that it has added.
Let's check it out now inside the node modules because I've installed globally is not here inside the
node module.
But if I check the package two is not here, but I can still use it, but I can still use it.
That's the beauty of installing modules or packages globally, but we need to avoid installing packages
globally.
Then this video.
Let's see how we can update a package.