[Solved] npm is not recognized as an internal and external command Error
Feb 12, 2025
Get the full source code of application here: 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 friends welcome to this video
0:02
so in this video I will show you how to
0:04
tackle this error message which comes
0:06
whenever you type npm it is say npm is
0:09
not recognized as an internal or
0:11
external command so the reason behind
0:14
this is that you haven't registered the
0:17
path of your nodejs inside environment
0:21
variable that's why it it can't detect
0:25
npm or if you type node the same message
0:28
comes so now you just need to find out
0:31
wherever your nodejs is installed so if
0:34
you haven't installed nodejs so the very
0:36
first step will be to download nodejs so
0:38
simply type on Google and download the
0:40
latest version so if you are on Windows
0:43
it will have this MSI file exe file so
0:47
I've already installed it so it's a
0:49
simple step by setup process cck next
0:52
next next so the default installation is
0:56
present in the C directory so just go to
0:58
C directory and then search for program
1:01
files and and then go to this directory
1:05
and just search nodejs and this
1:08
directory will show up right here so
1:11
this is your nodejs executable so if you
1:13
just open command line here and type the
1:16
same command npm so you will see the
1:18
command will get successful because you
1:21
are running the command from this
1:23
directory where the executables all
1:25
these executables are present so now we
1:28
just need to make sure that we copy this
1:30
path and we register this path globally
1:33
so that it is recognizable across the
1:35
whole system so just copy this path here
1:39
and then go to your environment variable
1:41
and uh
1:43
[Music]
1:45
just the these environment variables and
1:47
just go to the system variable and then
1:51
inside your path here simply click the
1:54
edit button and add the New Path here
1:58
which will be this complete path where
2:01
the nodejs is present C program files
2:04
nodejs that's all that we need to do and
2:07
now simply click okay okay just to apply
2:10
the changes and then you need to restart
2:12
the terminal and execute the same
2:14
command
2:16
here so if I just type here npm you will
2:19
see the command will be successful so
2:22
you can print out the version of
2:25
npm you can see 7.1 Point again if you
2:29
type node as well
2:31
so in this easy way you can fix this
2:33
error message by registering the path of
2:36
the nodejs and the environment variable
2:38
in the path I showed you step by step so
2:41
thank you very much for watching this
2:43
video and also check out my website as
2:46
well free mediat tools.com uh which
2:48
contains thousands of tools regarding
2:50
audio video and image and I will be
2:53
seeing you in the next video
#Programming