0:00
uh hello guys welcome to this video so
0:02
in this video I'll show you how to uh
0:04
rectify or fix that npm not recognized
0:08
error if you're getting this error while
0:10
running any sort of project React
0:12
project view project or any sort of
0:14
NodeJS project as well uh just make sure
0:17
that you have NodeJS installed because
0:19
npm is uh the part of NodeJS it's a uh
0:23
Node package manager so just make sure
0:25
that you have NodeJS installed so in my
0:28
case if you want to detect that you have
0:30
installed nodejs or not just open
0:33
command line and just type this command
0:35
where node this is actually the command
0:38
here just go to the command line just
0:40
type this command where node so it
0:42
actually returns the path where actually
0:45
your NodeJS installation is stored so
0:47
typically by default it's stored inside
0:50
the C drive whenever you install
0:52
download NodeJS it's installed in the
0:55
program files then it creates this
0:56
directory NodeJS and this is your
0:59
executable just make sure you added this
1:02
path inside your environment variable so
1:04
just go to environment variable and uh
1:08
right here there are two types of uh
1:10
environment variables first is a local
1:12
one and then is a system one if you want
1:14
to register it globally just open this
1:16
path here the system variable just add
1:19
it and here you need to add this entire
1:22
path that you got just copy this path
1:26
and simply create a new entry if you
1:28
haven't added this but I have already
1:30
added this so just make sure that you
1:33
added this path that's why if you run
1:36
the command this one it will print out
1:38
the version of NodeJS which is installed
1:40
on your machine similarly for npm it
1:45
npm-v so if you have done this uh step
1:48
if you already have the environment
1:50
variable added and still you are getting
1:53
this error npm not recognized while
1:55
running any sort of project then there
1:57
is a second method that I showed you you
2:00
need to open powershell windows
2:02
powershell inside uh run as
2:05
administrator just run this powershell
2:07
as administrator and here I will give
2:13
description so just copy this command
2:17
and paste it so it will ask you for the
2:21
execution policy change so this is
2:23
actually the command here set execution
2:26
policy dash scope current user dash
2:30
execution policy remote side so just
2:34
make sure that you execute this command
2:37
administration permission and just uh
2:41
proceed with the changes just press Y
2:43
and then it will execute this command
2:45
and then just restart your computer and
2:47
then again uh call the same npm command
2:50
so hopefully this will solve you your
2:53
problem of npm command not recognized in
2:55
VS code so also just restart your system
2:59
VS code and then execute the same
3:00
command so this is actually the main
3:02
command in PowerShell you just need to
3:04
execute this i have also given in the
3:06
command in the description so just tell
3:08
me in the comment section if your
3:09
problem is solved or not and also check
3:12
out my website freemediatools.com which
3:14
contains thousands of tools regarding
3:16
audio video and image