Opened 13 years ago
Closed 13 years ago
#31306 closed enhancement (fixed)
npm: don't build as root
Reported by: | ryandesign (Ryan Carsten Schmidt) | Owned by: | ci42 |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.0.3 |
Keywords: | haspatch | Cc: | ak.ml@… |
Port: | npm |
Description
In r84119 npm was modified to build as root, because otherwise this happens:
---> Building npm make: Entering directory `/opt/local/var/macports/build/_Users_rschmidt_macports_dports_devel_npm/npm/work/npm-1.0.30' scripts/doc-build.sh doc/adduser.md man1/adduser.1 npm ERR! Error: EACCES, Permission denied '/Users/rschmidt/.npm' npm ERR! Report this *entire* log at: npm ERR! <http://github.com/isaacs/npm/issues> npm ERR! or email it to: npm ERR! <npm-@googlegroups.com> npm ERR! npm ERR! System Darwin 9.4.0 npm ERR! command "node" "/opt/local/var/macports/build/_Users_rschmidt_macports_dports_devel_npm/npm/work/npm-1.0.30/cli.js" "install" "ronn" npm ERR! cwd /opt/local/var/macports/build/_Users_rschmidt_macports_dports_devel_npm/npm/work/npm-1.0.30 npm ERR! node -v v0.4.12 npm ERR! npm -v 1.0.30 npm ERR! npm ERR! Additional logging details can be found in: npm ERR! /opt/local/var/macports/build/_Users_rschmidt_macports_dports_devel_npm/npm/work/npm-1.0.30/npm-debug.log npm not ok make: *** [man1/adduser.1] Error 1
As we see npm is trying to write into my home directory. (Specifically, it is trying to install a couple node modules there that are used to build the manpages.)
Here is a patch to no longer build as root and no longer try to install the node modules to the user's home directory. (Instead, they're installed into the workpath.)
Attachments (1)
Change History (3)
Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)
comment:2 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)
Resolution: | → fixed |
---|---|
Status: | new → closed |
Committed in r84252 (maintainer timeout)
Note: See
TracTickets for help on using
tickets.
proposed patch