Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
FS#41254 - [nodejs] npm install --global doesn't respect 'prefix'
Attached to Project:
Community Packages
Opened by Michael Groufsky (wardsky) - Friday, 18 July 2014, 15:39 GMT
Last edited by Felix Yan (felixonmars) - Sunday, 20 July 2014, 15:57 GMT
Opened by Michael Groufsky (wardsky) - Friday, 18 July 2014, 15:39 GMT
Last edited by Felix Yan (felixonmars) - Sunday, 20 July 2014, 15:57 GMT
|
DetailsDescription:
According to npm-folders (https://www.npmjs.org/doc/global.html), global installs should be placed under the location set in the 'prefix' config variable. This doesn't seem to be working--instead, npm tries to install the package into the default location as if prefix wasn't set. Additional info: * package version is 0.10.29-1 Steps to reproduce: $ npm get prefix /usr $ npm set prefix $HOME/npm-install $ npm get prefix /home/me/npm-install $ npm install -g underscore npm ERR! Error: EACCES, mkdir '/usr/lib/node_modules/underscore' npm ERR! { [Error: EACCES, mkdir '/usr/lib/node_modules/underscore'] npm ERR! errno: 3, npm ERR! code: 'EACCES', npm ERR! path: '/usr/lib/node_modules/underscore', npm ERR! fstream_type: 'Directory', npm ERR! fstream_path: '/usr/lib/node_modules/underscore', npm ERR! fstream_class: 'DirWriter', npm ERR! fstream_stack: npm ERR! [ '/usr/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:36:23', npm ERR! '/usr/lib/node_modules/npm/node_modules/mkdirp/index.js:37:53', npm ERR! 'Object.oncomplete (fs.js:107:15)' ] } npm ERR! npm ERR! Please try running this command again as root/Administrator. npm ERR! System Linux 3.15.1-1-ARCH npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "-g" "underscore" npm ERR! cwd /home/me npm ERR! node -v v0.10.29 npm ERR! npm -v 1.4.14 npm ERR! path /usr/lib/node_modules/underscore npm ERR! fstream_path /usr/lib/node_modules/underscore npm ERR! fstream_type Directory npm ERR! fstream_class DirWriter npm ERR! code EACCES npm ERR! errno 3 npm ERR! stack Error: EACCES, mkdir '/usr/lib/node_modules/underscore' npm ERR! fstream_stack /usr/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:36:23 npm ERR! fstream_stack /usr/lib/node_modules/npm/node_modules/mkdirp/index.js:37:53 npm ERR! fstream_stack Object.oncomplete (fs.js:107:15) npm ERR! npm ERR! Additional logging details can be found in: npm ERR! /home/me/npm-debug.log npm ERR! not ok code 0 |
This task depends upon
Closed by Felix Yan (felixonmars)
Sunday, 20 July 2014, 15:57 GMT
Reason for closing: Fixed
Additional comments about closing: 0.10.29-3
Sunday, 20 July 2014, 15:57 GMT
Reason for closing: Fixed
Additional comments about closing: 0.10.29-3
Comment by Felix Yan (felixonmars) -
Saturday, 19 July 2014, 03:05 GMT
A new nodejs release with the fixed npm in the future is expected to fix this.
Comment by Michael Groufsky (wardsky) -
Saturday, 19 July 2014, 05:21 GMT
Ah, that's good news.
Comment by Felix Yan (felixonmars) -
Saturday, 19 July 2014, 11:47 GMT
Please test with 0.10.29-3, thanks.
Comment by Sean Fern (gsf) -
Sunday, 20 July 2014, 14:40 GMT
Just to note: the upgrade to 0.10.29-3 caused the "file exists in filesystem" error on a good number of files, and the usual "pacman -S --force nodejs" allowed the upgrade.
Comment by Felix Yan (felixonmars) -
Sunday, 20 July 2014, 15:05 GMT
Were the conflicted files in another package, or not owned? I cannot reproduce this locally though.
Comment by Sean Fern (gsf) -
Sunday, 20 July 2014, 15:55 GMT
They were not owned. Could have been due to a nodejs-related install outside of pacman, though I don't recall doing anything like that on this machine. Unfortunately, I neglected to save the output, but it included files such as /usr/share/man/man7/semver.7.
Comment by Felix Yan (felixonmars) -
Sunday, 20 July 2014, 15:56 GMT
I'm guessing something like installing new npm using npm itself. But anyway the package should work just fine.
npm-debug.log