0:00
uh hello guys welcome to this video so
0:02
in this video I will show you how to fix
0:04
this error which typically comes inside
0:09
project as you just type here npmi
0:12
command right here to install the
0:14
dependencies so some dependencies are
0:16
conflicting dependencies they depend
0:19
upon different reacts version so you can
0:22
see in my thing uh this dependency
0:25
material dependency is wanting this
0:28
react 80 but uh I am using react 16 so
0:32
it is the conflicting dependencies which
0:34
actually uh get this error when you do
0:38
this it can't resolve it basically so
0:42
now to fix this error it's very simple
0:44
to fix it uh the first thing you can do
0:49
you can create a special file here which
0:51
is uh a npm rc file so you will see the
0:57
icon will change in VS
0:58
code npm rc so just create this file
1:03
here and here you just need to write a
1:09
strict just type whatever I'm typing
1:12
right here in this file strict
1:15
per DPS dependencies just set this
1:19
option to true and the second option
1:23
legacy peer dependencies and set this
1:28
false so you will see we have set these
1:32
two options right here strict peer
1:35
dependencies to true and legacy peer
1:40
and if you do this again just type the
1:46
npmi the error will still stay because
1:49
the second option here legacy p
1:51
dependencies this is we need to set it
1:54
to true so just change it to true
1:57
because we want this option to be true
2:00
just uh create this file here npmrc file
2:04
and just write these two lines of code
2:07
here and now execute the same command
2:10
npmi so what you will see the command
2:13
will automatically successful so now
2:16
there will be no error coming all your
2:18
dependencies are successfully installed
2:21
so this is the first option you can
2:23
actually create this file here and just
2:25
copy these two lines of code here if you
2:28
don't want to create this simply delete
2:30
this if you don't want to create this
2:32
there is a second option which uh is
2:34
actually a command here you can simply
2:36
set again and if you see npmi again you
2:39
will see this error so now you can
2:41
actually set this option here
2:50
legacy pier dependencies and just set
2:54
this option to true so this is actually
2:56
the command here let me zoom in npm
3:02
legacy-per-ash dependencies and we are
3:04
setting this option to true so this will
3:07
make sure that all your conflicting
3:09
dependencies will be installed and just
3:11
execute this and then execute npmi and
3:15
now you will see you will no longer see
3:19
the error and all your dependencies will
3:22
installed and you will able to run your
3:25
project successfully by npm start so
3:30
uh way by which you can fix this error
3:32
inside your react chase project guys so
3:35
thank you very much for watching this
3:37
video and please hit that like button
3:40
comment as well if your problem is
3:42
solved and also check out my website
3:45
freemediattools.com which contains
3:48
thousands of tools regarding audio video