Reputation:
I was trying to install jquery through npm but after using following command:
npm install jquery
I opened the destination folder and the folder was empty. (I copied the following text from cmd)
> C:\Users\mandar\Desktop\Mady>npm install jquery
C:\Users\mandar
`-- [email protected]
> npm WARN enoent ENOENT: no such file or directory, open
> 'C:\Users\mandar\package.json'
npm WARN mandar No description
npm WARN mandar No repository field.
npm WARN mandar No README data
npm WARN mandar No license field.
What am I doing wrong? Please help me
Upvotes: 0
Views: 474
Reputation: 455
create package.json
file manually or through cmd by command npm init or npm install jquery --save
Upvotes: 0
Reputation: 1
As Suren Srapyan mentioned, in order to solve the problem, you need to create a package.json file, which describes the project you're working on.
The easiest way to create a package.json file is to run npm init
- this will invoke a terminal-based walkthrough of creating the package.json file.
Upvotes: 0
Reputation: 68675
You don't have a package.json
. Create a one and then try to install jQuery
. And instead use
npm install jquery --save
command to save the jquery dependency in the package.json file
You can do it manually creating package.json
or by
npm init
and passing the steps
Upvotes: 5