From the course: Learning npm: A Package Manager
Unlock the full course today
Join today to access over 24,700 courses taught by industry experts.
Adding node packages
From the course: Learning npm: A Package Manager
Adding node packages
- [Instructor] The first step and one that you might have encountered already is adding packages locally or globally. But what is the difference between the two? When a package is installed locally, it is installed on your project's directory, in this case, the one we're working on. When it is installed globally, it will be installed in your system, available to all projects. But we'll get back to that later. So let's go ahead and go into the terminal. So what I'm going to do is go Ctrl + grab it to bring the terminal. And then what I'm going to do is go ahead and do npm install and you can do i as a shortcut, and let's install express. And as you can see now we're going to have dependencies that are going to show up on our package.json file. So express to show up here. If you want to install dev dependencies, you do the exact same thing by doing npm install, and the only thing that you add is -save-dev and then you…