Open kojiwakayama opened 9 years ago
man npm
doesn't work for me on a standard node install either. I have to do MANPATH=/usr/local/lib/node_modules/npm/man man npm
in order to get it to work.
This sounds like a node issue, not an nvm
one?
there are npm man pages at: $NVM_DIR/$VERSION/lib/node_modules/npm/man . Would be great if it could be added like the node man pages: https://github.com/creationix/nvm/blob/master/nvm.sh#L586
Right, but what I'm saying is, node itself doesn't add those manpages when installed from source without nvm
.
nvm
shouldn't be setting up node any differently than the normal installation does.
it works for me on my machine where I have node installed via homebrew
Homebrew's not an officially supported way to install node - I wouldn't recommend it. The only supported (and recommended) ways are the downloadable binaries, or from source - which nvm
uses.
It's possible that the homebrew formula does some extra magic to make that manpage work.
The npm man pages work as well on a machine with Node installed via the official DMG image. It doesn't work for me when installing from source neither. Maybe its good to report an issue with Node.
Thanks! That definitely narrows it down.
Still not fixed today. I installed on Debian via the install script.
Problem: npm man pages are not working for me when I run: $ man npm
Reason: npm man pages path (~NODE_PATH/npm/man) is not in $MANPATH
Solution: npm man pages path (~NODE_PATH/npm/man) needs to be added to $MANPATH at: https://github.com/creationix/nvm/blob/master/nvm.sh#L586