Which npm/bin folder(s) should be in the PATH ? ( OS X 10.8.2 / npm installed with homebrew )

14,992

Maybe you are upgrading from old version fo node? I'm using node from homebrew repository since 0.8.17 and i don't have any subfolders in my /usr/local/share/npm/bin. It contains only simlinks to executable scripts of globally installed modules (in /usr/local/share/npm/lib/node_modules). So, i have /usr/local/share/npm/bin in my $PATH and it works fine. If you are upgrading from old version of node and npm, try to reinstall your globally installed modules before changing your $PATH.

Share:
14,992
Franco Rondini
Author by

Franco Rondini

rondinif.github.io rondinif@linkedin VIDEO: how to debug nodejs in vs code on mac osx As a developer I'm committed to continuous lifelong learning 📚 it's part of the job requirements! I thank all the members the StackExchange's community for the great help that comes to me and I try in my turn to give my little help as I can. ......more about me @Stackexchange** -about me at Stackoverflow -about me at Gardening and Landscaping -about me at Ask different -about me at Database administrators OSS: @Github and ..don't miss my Gists ;) @Atom.io MOOC: @Coursera @CodeSchool Social hubs: @Twitter @Facebook Some photos I took are available on: @Picasa @Flickr Some video are available on: @YouTube Some sketch are available on: @Openprocessing Some slide are available on: @SlideShare my gravatar

Updated on June 28, 2022

Comments

  • Franco Rondini
    Franco Rondini almost 2 years

    Upgrading node by using homebrew

    ==> Downloading http://nodejs.org/dist/v0.8.21/node-v0.8.21.tar.gz
    ######################################################################## 100.0%
    ==> ./configure --prefix=/usr/local/Cellar/node/0.8.21
    ==> make install
    

    I'm noticed this

    ==> Caveats
    Homebrew installed npm.
    We recommend prepending the following path to your PATH environment
    variable to have npm-installed binaries picked up:
      /usr/local/share/npm/bin
    

    In the $PATH I had already: /usr/local/share/npm/lib/node_modules/scripted/bin Should I add /usr/local/share/npm/bin too?

    Please note that /usr/local/share/npm/bin only contains two subfolder: scr and scripted that are also in /usr/local/share/npm/lib/node_modules/scripted/bin so what's the difference in the purpose of these two folders?

    EDIT /usr/local/share/npm/bin only contains two symlinks ( not subfolders )

  • Franco Rondini
    Franco Rondini over 11 years
    your answer reminded me I installed scripted and to make it work I added /usr/local/share/npm/lib/node_modules/scripted/bin but now this should no longer be useful thanks to the simlink ( not subfolders, I edited my question ). Thanks you!