- [Instructor] An npm audit is basically a command
that will check the dependencies of your project
and make sure they are safe to use.
Whenever you install a new package,
the command npm audit runs automatically
and tells you if there are any issues with a package,
like we saw earlier with socket.io.
Also make sure you have npm version six
or above for this to work properly.
So let's try this out.
So the first thing I'm going to do
is delete those two here.
I don't need these anymore and I don't want
to be confused with these and the full project here.
This is where socket.io is installed,
so I'm literally going to delete those just to make sure.
So I'm going to use this package, so again,
right click, open in VS Code if you're on a Windows,
and on Mac, simply drag and drop this into VS Code.
And as you can see, earlier, we installed socket.io
with this version, so if you want to test it again,
and actually let's do that.
Let's uninstall socketio, which will remove it
from the package, that JSON file here,
and then we'll install it again
just to see the message that we got.
Perfect.
So now let's install it again.
And whenever you install the package,
like I just said, it will run npm audit automatically.
So as you can see, there is nine vulnerabilities
in this particular package.
Eight that are low and one that is high.
So what we need to do next to make sure
that we see more details on this particular package,
is to run npm audit.
And now we get a full report of what are the issues.
So we'll explore this report
in the details in the next video.