I’m on Mac OS X and am using NVM installed via Homebrew. When I updated node with NPM, I started getting the error:

nvm is not compatible with the npm config "prefix" option

The Solution

I tried many things to fix this. Here is what worked:

$ mkdir ~/.nvm
$ brew update
$ brew uninstall nvm

Note that during the uninstall of nvm, I was warned that two other npm versions still existed. Homebrew showed me how to delete them. You should also delete them if you get the same warning:

brew uninstall --force nvm

Then reinstall nvm and a node version of your choice:

$ brew install nvm
$ brew install nvm 4.4.7 [or whatever version you want]

Also, I added the following two lines to ~/.bash_profile

export NVM_DIR="$HOME/.nvm"
. "$(brew --prefix nvm)/nvm.sh"

Start a new terminal window or bash shell, and BOOM: problem fixed.

Let me know if this works for you or if you have any problems or better solutions…

{ Comments on this entry are closed }

The Problem: npm ERR! extraneous

Checking out an npm problem, I tried

$ npm list

and got the following error at the end of my listing:

npm ERR! extraneous: fsevents@0.1.6 /Users/flichten/repos/cg/feature-library/feature-skeleton/node_modules/karma/node_modules/chokidar/node_modules/fsevents
npm ERR! extraneous: recursive-readdir@0.0.2 /Users/flichten/repos/cg/feature-library/feature-skeleton/node_modules/karma/node_modules/chokidar/node_modules/recursive-readdir
npm ERR! not ok code 0

The Explanation: Unneeded (“extraneous”) packages are installed

It seems the problem is really just a warning. NPM is saying that there are some unused, unnecessary packages installed. In most cases, this is probably an “error” that should be a warning and can therefore be ignored.

The Solution: npm prune

It’s probably safe to ignore this error. But you can clean up the unnecessary packages with

$ npm prune

Problem solved.

{ Comments on this entry are closed }

Ubuntu Missing add-apt-repository command

command line

Problem: apt-get-repository Command is Missing I was trying to install the latest version of git from the Ubuntu Git Maintainers Team and I needed to add a Personal Package Archive (PPA) to the Software Sources. But when I tried to do this, I got an error: Solution: Install the software-properties-common Package To get the add-apt-repository [...]

Read the full article →

Upgrading Ubuntu to Use the Latest Git Version

command line

Problem: Ubuntu Won’t Upgrade to the Latest Git Version I was running script that clone some git archives from GitHub and I got the following error: But when I tried to upgrade git, Ubuntu told me I already had the latest version: But I didn’t actually have the latest version. Solution: Add the Software Source [...]

Read the full article →

Tar Errors: Ignoring unknown extended header keyword


Problem: Unknown Tar Extraction Warnings/Errors I was running a script on Ubuntu Linux that extracted a tar archive, and I noticed many of the following errors whizzing by my console: I was concerned that the the extraction might not be working properly and that I might run into unexpected errors. Explanation: Mac OS X Issue [...]

Read the full article →

NetBeans Search Results Files Open in Output Panel Instead of Main Panel


I sometimes use NetBeans for PHP projects on my Windows laptop. I recently ran into a really annoying problem when doing a “Find in Projects” search. The search works fine, but when I double-click on a search result, the source file opens in the output panel right next to the search results. It should, of [...]

Read the full article →

W3 Total Cache Not Showing Config Tabs for WordPress Multisite Network


We’ve been using the WordPress W3 Total Cache plugin to speed up our WordPress sites. It rocks. And after a long hiatus, the author Frederick Townes finally updated it and now he’s giving it lots of attention. Thanks Frederick. Now it rocks even more!!! But… when we first upgraded, it didn’t seem to work. The [...]

Read the full article →

Photoshop Tips, Tricks, and Shortcut Keys


I use Adobe Photoshop on a pretty regular basis. But I still find I need to look things up from time to time. Sometimes I look things up because I’ve been doing it “the way I know how,” but I know that that must be a better (usually faster and easier) way and I am [...]

Read the full article →

How to Password Protect WordPress Admin (or Any) Apache Directory


If you are running WordPress, it’s a good idea to lock down the WordPress admin. Sure, it’s password protected already. But you can (and should) add some extra security to lessen your vulnerability to any newly discovered PHP or WordPress security bugs. Background We recently enhanced our own WordPress security and added an extra layer [...]

Read the full article →

301 Redirect from Bare Domain to Full WWW Domain


We recently set up Google Pagespeed Service for one of our WordPress sites. The site was setup with a “bare” domain name. That is, it had no subdomain. For example: http://healthfitnessexperts.com Google’s Pagespeed Service can’t handle bare domains. Like many content delivery networks (CDNs) and similar services, Pagespeed requires a subdomain like www. For example: [...]

Read the full article →