Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 682062 - net-libs/nodejs-10.15.3: 'npm help' cannot find man pages
Summary: net-libs/nodejs-10.15.3: 'npm help' cannot find man pages
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-03-30 14:52 UTC by Nico R.
Modified: 2020-11-09 12:56 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nico R. 2019-03-30 14:52:24 UTC
The 'npm help' command does not work properly, because it cannot find the installed man pages.

The help subcommand, implemented in help.js, looks for man pages in ../man (relative to its location). This means /usr/lib/node_modules/npm/lib/../man. This file does not exist. The problem can be solved by putting a symlink there:

libdir=/usr/lib
cd $libdir/node_modules/npm && ln -s ../../../share/man

The approach can be used as a quick fix. While this works fine, it also has a downside: 'npm help <topic>' will search though all files with basename like <topic> there, starting with npm-<topic> and then <topic>, it seems (I have not verified this in the code, though). This means that

npm help mv

will show the man page mv(1), even though it does not belong to npm or nodejs.

The problem can be remedied by creating $libdir/node_modules/npm/man/manX directories, with many symlinks to the /usr/share/man/manX/<manpage> files. This seems to be the technically best solution, in my opinion.

(The basic problem has also been mentioned in bug 425520 comment 3.)
Comment 1 Marek Szuba archtester gentoo-dev 2020-11-09 12:56:46 UTC
Closing due to inactivity, please reopen with updated information if this is still a problem.