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 )
The prefix config defaults to the location where node is installed. On most systems, this is /usr/local . On Windows, it's %AppData%\npm . On Unix systems, it's one level up, since node is typically installed at {prefix}/bin/node rather than {prefix}/node.exe .
You should run it in your project root folder, or the folder above your node_modules folder as sometimes the structure can differentiate between projects. But in general: the root folder of your project, as long as it is one folder above your node_modules.
That is a folder where binaries (executables) from your node modules are located. NPM site states: Executables When in global mode, executables are linked into {prefix}/bin on Unix, or directly into {prefix} on Windows. When in local mode, executables are linked into ./node_modules/.
You should have some familiarity with the Mac Terminal application since you'll need to use it to install and test Node and NPM. You'll also need the Terminal to use Node. js and NPM. The Terminal application is located in the Utilities folder in the Applications folder.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With