npm WARN package.json [email protected] No repository field

33,470

Solution 1

These warnings are just warnings, and don't indicate anything reason that the dependencies would not have downloaded.

The package.json file shown is working perfectly for me. To debug your issue, try removing the node_modules folder and running npm install again. Note that if the packages are already in the node_modules folder, npm install won't download them again.

If you want to fix the warnings:

  1. Before devDependencies, add a repository option; i.e. something like:

      "repository": {
        "type": "git",
        "url": "[git-url-of-your-project]"
      },
    

    The URL doesn't have to be a github one, just whatever you use to git clone the project on another computer.

  2. Add a file called README or README.md and write a few words about what the project is in it.

Solution 2

Mark your application as private to suppress all warnings by adding "private": true

{
  "name": "Stock",
  "version": "1.0.1",
  "private": true
}
Share:
33,470
Pablo
Author by

Pablo

Updated on September 24, 2020

Comments

  • Pablo
    Pablo over 3 years

    I have a project in a personal private git, I downloaded in another computer and when trying to download the packages in packages.json i got this error message:

    pablo@debian:~/Documents/clients/stock$ npm install
    npm WARN package.json [email protected] No repository field.
    npm WARN package.json [email protected] No README data
    

    This is the content of the packages.json

    {
      "name": "Stock",
      "version": "0.0.1",
      "description": "Stock App",
      "devDependencies": {
        "grunt": "~0.4.5",
        "grunt-contrib-watch": "^0.6.1",
        "grunt-execute": "^0.2.2",
        "socket.io": "latest",
        "mysql": "latest",
        "express": "latest",
        "path": "latest",
        "express-session": "latest",
        "cookie-parser": "latest",
        "ejs": "latest"
      },
      "dependencies": {
        "socket.io": "~1.3.7",
        "body-parser": "~1.14.1"
      }
    }
    

    What can I do, to packages to download, and why in my other computer I don't get this error?