NPM - How to fix "No readme data"

I have a simple package.json:

{
  "name": "camapaign",
  "version": "0.0.1",
  "scripts": {
    "start": "node app.js"
  },
  "engines": {
    "node": "0.10.15",
    "npm": "1.3.5"
  },
  "repository": { 
    "type": "svn",
    "url": ""
  }
}

When I execute "npm install" i get the following warning which I would like to fix:

"npm WARN package.json [email protected] No readme data."

I have tried adding "README.md" & "readme.txt" to the same dir as the package but with no joy. What am I missing?


Solution 1:

Simply adding a README.md file will not fix it, you should write something inside it; at least the project title and a brief description is good for people! But for NPM, one byte may be enough...
Doing so should stop showing the warnings.

Also, when you read that warning, ensure that the problem is not related to a 3rd party package.

Solution 2:

Just set as private ;)

{
  "name": "camapaign",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "start": "node app.js"
  },
  "engines": {
    "node": "0.10.15",
    "npm": "1.3.5"
  },
  "repository": { 
    "type": "svn",
    "url": ""
  }
}

Solution 3:

Adding a README.md to your project root is the answer, but I've noticed that it takes a short while for NPM to pick up on this. Maybe a few minutes?

Solution 4:

Add to package.json "readme": "README.md"