So, the `npm prefix` command is accurately telling you that a local install in the current working dir would install into /home/me. Try `npm prefix -g` to find out where a global install would go. (Spoiler: It'll be /home/me/.local/)
The ENOENT is particularly weird. From the debug log, it looks like there is a corrupted file in either the cache or the temp folder. Can you try this? rm -rf /home/me/.local/tmp/npm* npm cache clean And then try to install express again. By the way, you may want to consider setting the "cache" config to something like /home/me/.local/npm-cache/ or something, if you are into putting all your stuff in ~/.local On Wed, May 29, 2013 at 7:00 PM, <[email protected]> wrote: > Hello guys, > > I installed node.js inside ~/.local (.configure --prefix), according to this > post[1], so I configured somethings this way: > > # ~/.npmrc > prefix = ${HOME}/.local > tmp = ${HOME}/.local/tmp > > $ ln -s ~/.local/lib/node_modules .node_modules > $ echo "export PATH=$HOME/.local/bin:$PATH" >> ~/.bashrc > > So, when I try to run "npm install -g express", I get this error: [2]. But, > when I run with "--prefix $HOME/.local", everything is ok. I've tried to > check if npm is getting right {prefix}, so: > > $ npm prefix > /home/me # this looks wrong > $ npm get prefix > /home/me/.local # this looks right > > I'm almost sure there's something I'm doing wrong, but what is it? > > [1]: http://tnovelli.net/blog/blog.2011-08-27.node-npm-user-install.html > [2]: https://gist.github.com/lucassmagal/5675304 > > -- > -- > Job Board: http://jobs.nodejs.org/ > Posting guidelines: > https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines > You received this message because you are subscribed to the Google > Groups "nodejs" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/nodejs?hl=en?hl=en > > --- > You received this message because you are subscribed to the Google Groups > "nodejs" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > > -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
