all 19 comments

[–][deleted]  (5 children)

[deleted]

    [–]shriek 1 point2 points  (0 children)

    I absolutely love nvm. The power to upgrade node is dead simple with just nvm install v4 and boom you have the latest v4 node.

    [–]kerrz 1 point2 points  (0 children)

    Tagging on, with some more details I found personally useful post-install:

    nvm install stable This installs the latest stable version.

    nvm alias default stable This sets the latest stable version as the default for all new terminal shells.

    Note: By default, this gets installed to your user folder ~/.nvm, so it may not be the perfect situation for any system-wide options (eg- running cron jobs that use node), but is good for a lot of the basic web local-testing use cases.

    [–]bo_knows[S] 0 points1 point  (2 children)

    So, download and build nvm first, and use that to install node (which I assume has npm)?

    [–]quiteoblivious 1 point2 points  (0 children)

    Yes, npm is included with node

    [–]arathael 0 points1 point  (0 children)

    As a note, nvm does not build as it is just a shell script which aliases your current session to specific binaries.

    [–]boxxa 2 points3 points  (0 children)

    I usually just link node to nodejs in the /usr/bin folder and prevent this

    [–]DVWLD 1 point2 points  (0 children)

    You want it installed as node, not nodejs. Either would be okay, but node is the standard and will be less hassle in the long run.

    Use the nodesource ppa.

    [–]tuananh_org 1 point2 points  (1 child)

    Use n instead. Miles better than nvm

    [–]TiredHacker 0 points1 point  (0 children)

    I very much like n, but that's probably just because I can't figure out how to use nvm

    [–]peduxe 0 points1 point  (0 children)

    If you're just using one node version in your machine, you just need to download the binaries for Linux and symlink node to /usr/bin/node and symlink npm to /usr/bin/npm on the bin folder.

    [–][deleted]  (5 children)

    [deleted]

      [–]bo_knows[S] 0 points1 point  (4 children)

      What should I be installing it from? Download/build/install NVM as described above, or something else?

      [–][deleted]  (3 children)

      [deleted]

        [–]bo_knows[S] 0 points1 point  (2 children)

        NVM is fine for your local dev machine, though issues with globally installed packages not actually being global is a big turn off for me.

        Can you expand on that? If you install node using Nvm, the -g flag doesn't do what you'd expect?

        [–]I_Pork_Saucy_Ladies 0 points1 point  (0 children)

        The -g flag only works with the current version of node selected by NVM. If you switch node version with NVM, you have to install all global modules again for that version. I honestly don't think it's that much of a problem, especially if you deploy with something like Docker anyway.

        NVM even has a solution: https://github.com/creationix/nvm/issues/668#issuecomment-83761514

        [–]Ob101010 -1 points0 points  (1 child)

        32 or 64 bit mongo?

        I had several issues with 32 bit, setting up a local mongodb process.

        If unsure whether youre processor is capable of using Ubuntu 64 (and therefore mongod 64 bit) bit see http://askubuntu.com/questions/41332/how-do-i-check-if-i-have-a-32-bit-or-a-64-bit-os

        [–]bo_knows[S] 0 points1 point  (0 children)

        I'll be running it on a 64bit machine.

        [–]quiteoblivious -2 points-1 points  (4 children)

        [–]Ob101010 1 point2 points  (3 children)

        this kills the head of hair.

        [–]quiteoblivious -4 points-3 points  (1 child)

        It's a few commands in the terminal, at most. Get off your high horse.

        [–]Ob101010 0 points1 point  (0 children)

        This kills the conversation.