[MacPorts] #33175: NPM doesn't install packages in the appropriate location
MacPorts
noreply at macports.org
Tue Feb 7 01:34:57 PST 2012
#33175: NPM doesn't install packages in the appropriate location
--------------------------------+-------------------------------------------
Reporter: conradwt@… | Owner: macports-tickets@…
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.0.3
Keywords: | Port: npm
--------------------------------+-------------------------------------------
npm requires one to install packages using sudo. For example,
{{{
sudo npm install <package-name>
}}}
Otherwise, one will receive the following message:
{{{
$ npm install pubnub
npm http GET https://registry.npmjs.org/pubnub
npm http 304 https://registry.npmjs.org/pubnub
npm ERR! error installing pubnub at 3.1.6
npm ERR! error rolling back pubnub at 3.1.6 Error: EACCES, permission denied
'/opt/local/lib/node_modules/pubnub/package.json'
npm ERR! Error: EACCES, permission denied
'/opt/local/lib/node_modules/pubnub/package.json'
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR!
npm ERR! System Darwin 11.3.0
npm ERR! command "node" "/opt/local/bin/npm" "install" "pubnub"
npm ERR! cwd /Users/conradwt/nodejs.dir/examples/pubnub-example
npm ERR! node -v v0.6.10
npm ERR! npm -v 1.1.0-2
npm ERR! path /opt/local/lib/node_modules/pubnub/package.json
npm ERR! code EACCES
npm ERR! message EACCES, permission denied
'/opt/local/lib/node_modules/pubnub/package.json'
npm ERR! errno {}
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/conradwt/nodejs.dir/examples/pubnub-example/npm-
debug.log
npm not ok
}}}
Furthermore, when I do not want to install packages globally but within
the project directory. For example, the package is installed in
/opt/local/lib/node_modules/pubnub
instead of the current working directory.
--
Ticket URL: <https://trac.macports.org/ticket/33175>
MacPorts <http://www.macports.org/>
Ports system for Mac OS
More information about the macports-tickets
mailing list