How to Resolve Vulnerabilities when "npm audit fix" does not work Using NPM Overrides in VS Code
279 views
Jun 3, 2025
Get the full source code of application here: Watch My Visual Studio Code IDE Setup Video For Fonts,Themes & Extensions https://youtu.be/Bon8Pm1gbX8 Hi Join the official discord server to resolve doubts here: https://discord.gg/cRnjhk6nzW Visit my Online Free Media Tool Website https://freemediatools.com/ Buy Premium Scripts and Apps Here: https://procodestore.com/
View Video Transcript
0:00
uh hello guys uh welcome to this video
0:02
so in this video I will show you how to
0:04
resolve a vulnerabilities whenever this
0:08
command fails which is npm audit fix
0:11
command which is there inside NodeJS if
0:14
you have any sort of errors if you have
0:16
any sort of warnings inside your NodeJS
0:20
project so this is actually a command
0:22
which is there if it does if it doesn't
0:25
work in this video I will show you how
0:27
to manually resolve these
0:29
vulnerabilities inside your project so
0:31
let's suppose we have this uh react
0:33
project here if you can see and if I try
0:36
to install some dependencies npmi we are
0:40
installing all these project
0:42
dependencies so at the end here you will
0:44
see this uh it shows you that uh inside
0:48
your
0:49
project eight vulnerabilities are there
0:52
two moderate and six
0:55
high so if you want to resolve these
0:59
vulnerabilities because if you're
1:01
deploying your project it's better that
1:03
you don't have any sort of
1:04
vulnerabilities so they have given this
1:06
command here npm audit fix
1:10
so so just if you want to resolve it
1:13
first of all just try this with this
1:15
command npm audit if you run this
1:18
command it will give you the breakdown
1:20
of each
1:21
vulnerability which uh errors are cause
1:25
causing it it will give you this
1:27
breakdown this is actually the
1:29
dependency nth check which is creating
1:32
this high vulnerability if you can see
1:35
and also the second one which is post
1:38
CSS so it actually this command actually
1:41
tells you the entire report of your
1:43
project this command here which is npm
1:46
audit so we run this command and then we
1:50
also have this uh command npm audit fix
1:54
so just run this npm audit
1:59
fix-4
2:01
fix so just run this if it fixes all
2:04
your vulnerabilities then it is good but
2:08
if this command doesn't work then I will
2:10
show you the second one which is npm
2:12
overriding you can see still it hasn't
2:16
resolved the
2:17
vulnerabilities so now what you need to
2:19
do there is a concept here uh inside
2:23
your package.json file just add this
2:25
code here this is called as npm
2:28
overriding so there is a uh section you
2:31
can add right here which
2:33
is
2:35
override so this actually you can target
2:40
uh individual dependencies or libraries
2:42
which are creating problems so we saw
2:46
this uh by running this npm audit
2:48
command these two dependencies anith
2:50
check and the second one is post css so
2:54
just search go to npmjs.com just search
2:59
for this packages first of all this
3:01
package which is nith check just
3:06
uh right here just search what is their
3:09
latest
3:10
version just install the latest version
3:13
here uh which is this version if you see
3:16
2.1.1 so we manually will add this so n
3:22
check so This
3:26
will give you just add the version
3:28
number right here so right here you will
3:32
add this version
3:33
2.1.1 and similarly we need to repeat
3:36
this for the second one which is
3:38
creating problem which is your uh post
3:42
CSS so again just search for the latest
3:45
version which is there and uh inside
3:48
this way you can use this concept
3:51
overriding to actually target individual
3:54
dependencies without having to so you'll
3:57
see this is their latest version which
3:59
is
4:01
8.5.3 so I will just copy this and just
4:04
paste
4:07
it so after doing this uh just you just
4:11
need to delete uh this folder which is
4:16
uh this
4:18
package log folder you need to delete
4:21
this and also this node modules folder
4:23
before running npmi so there is a
4:26
command in windows so
4:28
delete
4:31
package lock json so it will delete this
4:34
file and also just delete the node
4:37
modules
4:38
directory by this
4:42
command remove directory and it will
4:45
remove this
4:48
directory so it
4:51
will delete everything so now your node
4:55
modules directory has been successfully
4:57
removed and now run the command npmi so
5:00
again if you run this by making these
5:02
changes just adding this overrides now
5:06
it will actually install everything from
5:08
scratch and now you will not see those
5:12
vulnerabilities at the bottom
5:15
side so just wait for all the
5:18
dependencies to get installed so this
5:20
will work for any sort of project it can
5:23
be view per project react angular the
5:26
process will remain the same you just
5:28
need to add this section of overrides
5:31
just target which dependencies are
5:33
creating problem using npm audit command
5:36
and then you can fix
5:37
this and
5:40
uh now if you see there will be no
5:47
vulnerabilities so it is just uh
5:50
installing the dependencies so just wait
5:53
and just comment on this video if your
5:55
problem is solved so that other people
5:57
can see so if you follow this
5:59
instruction and if you able to solve the
6:03
problem you can comment on this video
6:04
and also hit the like button as well so
6:07
now if you see the summary here zero
6:10
vulnerability so you will see this green
6:13
option found zero and again if you run
6:16
the command npm audit which will audit
6:18
your project and now it will see found
6:22
zero vulnerabilities so in this way you
6:24
can manually resolve the issues and
6:27
vulnerabilities if the npm audit fix
6:29
command doesn't work inside any node
6:34
project it can be view react angular so
6:37
this is a step-by-step way and thank you
6:39
very much for watching this video and
6:41
also check out my website
6:43
freemediatools.com
6:44
uh which contains thousands of tools
6:46
regarding audio video and image
#Scripting Languages