Pooja Asthana
Pooja Asthana

Reputation: 1

npm install is not working. I am getting npm WARN package.json project name (in my case it is NodejsDemo) @0.0.0 No repository field

I have installed node.js along with npm module manager. I have created a package.json file and from the root directory I am trying to execute npm install command but I am getting npm WARN package.json project name (in my case it is NodejsDemo) @0.0.0 No repository field.

Upvotes: 0

Views: 1410

Answers (2)

abdulbari
abdulbari

Reputation: 6242

If you want to create package.json file manually then use

`npm init`  

command to create your package.json file

Do this command in your root folder

It will ask to give some information during creation.

After creating file, you can use it.

and if you want to save your new modules in your package.json

just do like this for example install async module

npm install async --save

and async module name with version will appear in your package.json file

Upvotes: 0

Krystian Czaplicki
Krystian Czaplicki

Reputation: 11

From using a package.json

  • As a bare minimum, a package.json must have:
    • "name"
      • all lowercase

Try lowercase name like nodejsdemo

and you should add repository like

"repository": {
  "type": "git",
  "url": "git://git_repo_link_here"
}

but it's only warning and it doesn't affect on installation.

Upvotes: 1

Related Questions