npm gets wrong README when package gets published #5583

diosney opened this Issue Jun 30, 2014 · 2 comments


None yet

3 participants

diosney commented Jun 30, 2014

In my package I have three readme files, like the following:


When I publish the package with npm publish, it doesn't shows up the file as the package info at, but instead it gets whatever other README file it encounters first.

There is a way to enforce the main README file that npm gets? Or I have to move the other README files to a subdir?

Thanks in advance for your help.

@diosney diosney referenced this issue in diosney/node-netfilter Jun 30, 2014

Wrong README on #1

@othiym23 othiym23 changed the title from NPM gets wrong README when package gets published to npm gets wrong README when package gets published Sep 19, 2014
@iarna iarna added the bug label Sep 19, 2014
smikes commented Nov 13, 2014

Although it is undocumented, I believe you can set "readmeFilename" in your package.json to specify which README should be used.

See the discussion here: #3573 (comment)

Whoops, nope, I have that backwards. Apparently readmeFilename is SET with the name of the the file that README data was drawn from.

The workaround that you have settled on (renaming/moving files to a subdirectory) is probably the correct approach.

diosney commented Nov 14, 2014

@smikes Ok, currently I solved the issue by moving the secondary README files to a subdir as you said, but it could be nice to have an option similar to the one you pointed out to specify the main README file so the subdir workaround can be avoided

So thanks to add to the discussion, despite the fact that readmeFilename couldn't be used!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment