0:00
uh hello guys uh welcome to this video
0:02
So in this video I'll show you how to
0:04
fix this error message Basically it
0:06
comes uh when you try to run npmi
0:09
command inside your NodeJS project So I
0:12
have this index.js file and I'm
0:14
basically having this simple express
0:16
project where I'm requiring this express
0:19
uh dependency and just I execute npmi in
0:23
the terminal and I get this error Uh
0:25
this error basically simply says that uh
0:29
en o n t and could not read package.json
0:33
file no such file or directory So
0:36
indirectly it is saying that no
0:38
package.json file is present inside your
0:41
directory So package dojson file is
0:43
actually the file where you mention all
0:45
the dependencies that you are using
0:47
inside your NodeJS project So right here
0:50
if you see we haven't have any sort of
0:52
package.json file So for just fixing
0:55
this error message we just need to
0:57
execute this command here npm
0:59
init-y So if you just execute this
1:02
command uh there it will actually create
1:04
a package.json file You will see on the
1:07
left hand side uh this file has been
1:10
created So inside this file you actually
1:13
need to install the dependencies that
1:15
you are will be using inside your NodeJS
1:17
project So right here we just need to
1:21
uh npmi express So just you need to
1:25
install this dependency So after it
1:28
installs now you can easily run your
1:30
NodeJS project So if you just run node
1:33
index.js so you will see your project
1:36
will be running So very simply So in
1:40
this way you can fix that error message
1:43
So just first of all create the
1:45
package.json file then install the
1:48
dependencies and then you can easily run
1:50
the NodeJS project So just follow the
1:52
step-by-step instruction that I showed
1:54
you in this video Hopefully your error
1:56
will be solved So if your error is
1:58
solved you can comment on this video and
2:00
also hit the like button and also check
2:06
freemediatools.com which contains