FAQ
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 nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscribe@googlegroups.com
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 nodejs+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Isaac Schlueter at May 30, 2013 at 3:22 pm
    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, 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 nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    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 nodejs+unsubscribe@googlegroups.com.
    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 nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    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 nodejs+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupnodejs @
categoriesnodejs
postedMay 30, '13 at 10:48a
activeMay 30, '13 at 3:22p
posts2
users2
websitenodejs.org
irc#node.js

2 users in discussion

Me: 1 post Isaac Schlueter: 1 post

People

Translate

site design / logo © 2021 Grokbase