This warning appears when npm cannot find a README.md file in your package root directory during publication. While not required to publish, npm expects packages to include a README because it serves as the primary documentation displayed on npmjs.com.
This warning appears when npm cannot find a README.md file in your package root directory during publication or installation. While technically not required to publish a package, npm expects published packages to include a README file because it serves as the primary documentation displayed on the package's npmjs.com page. The registry stores the first 64KB of the README content and renders it as GitHub Flavored Markdown. Without a README, your package page on npmjs.com shows "This package does not have a README" message, reducing discoverability and user confidence. This is a warning, not an error—your package will still publish, but it signals incomplete package metadata.
Create a new file named exactly README.md in your project's root directory (same level as package.json). This file must use the .md markdown extension.
At minimum, include:
# My Package
A useful utility for X.
## Installation
\`\`\`bash
npm install my-package
\`\`\`
## Usage
\`\`\`javascript
const myPackage = require('my-package');
// example code
\`\`\`
## License
MITExpand README with:
- Usage - Code examples showing how to use the package
- API - Function/method documentation
- Node/npm requirements - Minimum versions needed
- License - What license the package uses
- Badges - Build status, coverage, version badges (improves quality score)
Check your .npmignore file. Ensure it does NOT contain *.md or explicitly exclude README.md. If present, remove those lines—npm should never ignore README files.
Run npm pack to create a tarball and verify README.md is included:
npm pack
tar -tzf your-package-name-1.0.0.tgz | grep READMEShould show the README file in the output.
README Content Limits: npm stores only the first 64KB of README content. For large documentation, keep detailed docs in a separate documentation site.
Publishing Workflow: npm REQUIRES a version bump to update the README. Simply editing README.md and re-running npm publish with the same version will not update npmjs.com.
Quality Score Impact: Including a well-structured README with sections, code examples, and badges significantly improves your package's quality score on npmjs.com.
File Format: README.md should be UTF-8 encoded. npm's markdown renderer expects GitHub Flavored Markdown (GFM).
npm ERR! code E401 npm ERR! 401 Unauthorized - Token has expired
Token has expired - npm authentication failure
npm ERR! code ENOAUDIT npm ERR! Audit endpoint not supported
How to fix "npm ERR! code ENOAUDIT - Audit endpoint not supported"
npm ERR! code EBADDEVENGINES npm ERR! devEngines.runtime incompatible with current node version
How to fix "npm ERR! code EBADDEVENGINES - devEngines.runtime incompatible with current node version"
npm ERR! code EAI_NODATA npm ERR! errno EAI_NODATA npm ERR! getaddrinfo EAI_NODATA registry.npmjs.org
How to fix "npm ERR! code EAI_NODATA - getaddrinfo EAI_NODATA"
npm ERR! code ETOOMANYARGS npm ERR! Too many arguments
How to fix "npm ERR! code ETOOMANYARGS - Too many arguments"