I don't know what's going on, but none of my installed node packages are actually registered.
npm and node work fine, but if I sudo npm install -g ffmpeg or brew, they're listed at /usr/local/lib/node_modules but brew -v and ffmpeg -v don't do anything "command not found"
Any help is much appreciated, I'm pretty new with command line stuff. I think I'm confused on the difference between
npmandbrew... Does npm symlink to the command line, or only allowrequire("brew")within node instances?
One time, I did follow some instructions for registering "sublime" as a command line alias. Don't really think that should affect anything, but I don't even know where to look
1 Answer
Is there anything displayed if you run npm get prefix ? (For example's sake, I'll say "/usr/local" is returned after running the command)
If anything is returned after running the above command, check what your PATH environment variable is set as by running echo $PATH (Again for example's sake, I'll say "/usr/bin:/bin:/usr/sbin:/sbin" is returned after running this command)
If the prefix returned from npm get prefix is not shown in your PATH – which is true for the example above since "/usr/local/" is not in PATH – you will then have to set your PATH variable. To set your PATH:
If your shell is Bash, run: export PATH="[prefix]/bin:$PATH" >> ~/.bash_profile where [prefix] is the returned value of npm get prefix
So, using "/usr/local" again as the example, replace "[prefix]" with "/usr/local" as shown belowexport PATH="/usr/local/bin:$PATH" >> ~/.bash_profile
then dosource ~/.bash_profile
(You said you are pretty new to command-line stuff, so if this does not make much sense, leave a comment and I will try to provide further clarification)
3