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 error code ENOENT npm error syscall spawn git npm error path git npm error errno -4058 npm error enoent An unknown git error occurred
How to fix "spawn git ENOENT" in npm
npm error code E401 npm error Incorrect or missing password.
How to fix 'E401 Unable to authenticate' errors with npm private registries
npm notice access token expired or revoked. Please try logging in again.
Token has expired - npm authentication failure
npm ERR! code EAI_AGAIN
How to fix "EAI_AGAIN" in npm
npm error code E403 npm error 403 Forbidden - PUT https://registry.npmjs.org/<package>
How to fix 'E403 Forbidden' error in npm