npm Tutorial - 3 - npm install and uninstall - npm Tutorial For Beginners
www.VictorDozal.com
What is npm? In 2 minutes - npm tutorial for beginners
[ Ссылка ]
----------------------------------
Hellooooo there, beautiful, amazing and gorgeous people.
In this tutorial, we will be going over the npm install and uninstall commands
Let us get started!
To install an npm package, it is as simple as using the command "npm install package-name". I found an awesome package called "hello-world-npm", so I will go ahead and install it with the command "npm install hello-world-npm".
This command creates a folder in your project called "node_modules". This folder is where all the packages you install into your project will be placed.
That is it; you have now installed an npm package. That was easy, right?
If we type the command "npm ls" we will see that indeed, the "hello-world-npm" package was installed to our project.
Let’s dive a little deeper. Remember the packageJS file we talked about earlier? To recap, the packageJS file is the file that contains a list of packages your project needs to run. If we open the packageJS file we will see that nothing changed. This means that the project has no idea we just installed the "hello-world-npm" package.
To fix this, we have to use the same command, but include the flag "--save". This "--save" flag adds the package to our packageJS file so that in the future someone else can download our project and automatically install all of the required dependencies.
To uninstall a package from our project, it’s as simple as typing the command "npm uninstall --save package-name". In our case, we will type "npm uninstall --save hello-world-npm".
That is it for now. If you have any questions leave a comment for me and I will do my very best to help you out.
As always, please support me by subscribing, liking the video, leaving a comment, and sharing the video with your friends.
See you next time!
Ещё видео!