iancrowther
iancrowther

Reputation: 5163

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?

Upvotes: 194

Views: 68309

Answers (5)

jyjin
jyjin

Reputation: 103

my solution

  • npm show
  • npm dist-tag add

1.use npm show check the remote website deploy info.

eg.should like this:

[email protected] | Proprietary | deps: 14 | versions: 289
<span style="color:red;">最新日志倒序在这里增加,注明作者+日期+功能</span>

dist
.tarball: https://registry.npmjs.org/xxx/-/xxx-0.3.60-beta.tgz
.shasum: 021e30640a62f13905b1e2b7a4facd169df46a1d
.integrity: sha512-9N4pUwwoYGNek34fCCCjURuQdx1K5VBlCWl4t1sy8wi3xul/N/TiDvjmUBF24t2Dg2fX6cFM9on+tftnVaEr7A==
.unpackedSize: 114.5 kB

dependencies:
@hanyk/rc-viewer: ^0.0.3        crypto-js: ^3.1.9-1             moment: ^2.25.3                 react-dom: ^16.12.0             uuid: ^3.3.3                    
axios: ^0.19.0                  dirty-json-ie11: ^0.0.2         query-string: ^6.9.0            react-quill: ^1.3.3             yqquill-image-drop-module: ^0.0 
cookie-universal: ^2.0.16       md5: ^2.2.1                     quill-delta-to-html: ^0.11.0    react-resizable: ^1.10.1        

maintainers:
- jyjin <[email protected]>
- jyjin1 <[email protected]>
- jyjin2 <[email protected]>

dist-tags:
beta: 0.3.61-beta    latest: 0.3.53-beta  

published 26 minutes ago by jyjin1 <[email protected]>

2.npm dist-tag add [PACKAGE_NAME]@[VERSION]

and then update lasest 0.3.53-beta to 0.3.61-beta

npm dist-tag add [email protected]

3.npm show check agin

same to step 1

go back to your npm package site, all have refreshed!


Wish to helps, thanks.

Upvotes: 0

Richard Hunter
Richard Hunter

Reputation: 2200

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?

Upvotes: 11

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

Upvotes: 1

gustavohenke
gustavohenke

Reputation: 41440

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.

Upvotes: 224

Klayton Faria
Klayton Faria

Reputation: 1905

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": ""
  }
}

Upvotes: 176

Related Questions