NodeJS + NPM “Cannot find module”

TL;DR: install your NPM packages globally. Like this (where “homebridge” is whatever package you are installing):

sudo npm install homebridge -g

This was driving me crazy. I have been trying to install a couple of NPM packages with dependencies, and run them at startup as a service on an Ubuntu server. I knew the packages weren’t ending up in the right place (even when run as sudo), but I couldn’t figure out why.

Using the -g (global) option cleared everything back up. Now all the dependencies are installed for all users, and my service starts without errors.

The errors were like these:

Error: Cannot find module 'request'

Continue reading

Prepaid Data in Mexico

SIMOn a recent trip to Puerto Vallarta, me and fellow travellers wanted to stay connected without paying huge money for roaming or shoddy hotel wifi. So I looked into getting a Mexican SIM card for my iPhone. Its not quite as easy as prepaid in the US or Europe, but the good news is that if you want to get online while visiting Mexico it is relatively simple and inexpensive.

Actual calling tariffs in Mexico are very confusing. They’re based on regions and, depending on where you call within Mexico, your calls could be very cheap or very expensive (like long distance in Canada). You’re also charged extra if you travel outside of your very small home region. So I decided to skip native calling and texting altogether, and opt for data-only instead. VOIP, email and app based texting.

There are a number of cellphone companies in Mexico. Telcel, Movistar, Isuacell, Nextelamong others, but Telcel and Movistar have the most widespread 3G networks that are compatible with iPhones and other unlocked GSM devices. And between those Telcel is said to have to greater coverage at somewhat higher cost.

I was ready to try out either Telcel or Movistar, but it turned out that we drove past a Telcel shop first. It was right on the big highway in Bucerias (Nuevo Vallarta area). There are plenty of these little stores and you shouldn’t have trouble finding one. We went inside and I explained what I wanted to do. There was a language barrier, but in my case a salesperson’s friend was visiting and he spoke perfect English. You might want to write down or save a couple phrases in Google Translate before heading to the shop.

I’ve read online that some have had to go into a big city and have their passport scanned. But in my case they just had me write down the spelling of my name, the hotel I was staying at and we were good to go. Activation was done over the phone.

The SIM card was $149MX (just over $10CAD). There’s plenty of data plans to choose from, but I went with the 1GB/7days for $199MX (about $15CAD). They activated it for me it was working right away. If you need to reload your account to buy more data or check your usage you can do it from the Telcel self-serve website. The site accepts international credit cards.

Coverage was OK. It worked just about everywhere, except inside the lobby of the hotel where there were some dead spots. It was mostly 3G but I saw Edge sometimes too. Speeds aren’t amazing but better than the hotel wifi.

I used the Personal Hotspot feature on my phone, and we had up to 5 devices surfing and emailing harmonioulsy.

Free Visual Voicemail in Canada

Visual voicemail is an idea that’s been around for a long time, but most people are still using archaic dial-in systems. One problem is that carrier and handset support for the feature is uncommon, and another is that it usually has an associated cost.

So lets devise that plan that nets you visual voicemail that works on any handset, most carriers and doesn’t cost you anything extra. For this to work you’ll need data and push email accounton your phone. You’re plan must also support conditional call forwarding. And finally we’ll need an account at freephoneline.ca (where the real magic happens here).

The first thing you should do is setup your account at Free Phone Line. These guys offer a free Canadian phone number, voicemail, long distance and more. Follow the instructions and make sure you choose a local number. Once your account is created and verified, we can start to setup the voicemail. The first thing you might want to do is record your voicemail greeting. Download and open the FPL softphone app on your computer, dial *98 (or click the voicemail button) and follow instructions to record your greeting.

Now you should configure the system to email the voicemails to you. On the FPL website, make sure you’re logged in and click on the Change Details page. Set the “Correspondence Email” to your push email account, and at the bottom of the page set “Enable voicemail to email” to copy or forward. Copy will email your voicemails to you and keep a copy on the FPL server (so you could dial in and check if you wanted) and forward will simply email you the voicemails and then delete them from the FPL system. Click save.

Test what we have so far. Call your FPL number, leave a voicemail and make sure it gets pushed to your phone.

iOS 5 email notification

OK, now for the tricky part. Get your mobile and dial these three sequences to connect your phone to the FPL voicemail:

  1. Dial *67*[FPL phone number]# and SEND “Call forward if busy”
  2. Dial *61*[FPL phone number]# and SEND “Call forward if not answered
  3. Dial *62*[FPL phone number]# and SEND “Call forward if unreachable”

Now your phone should be setup with the FPL voicemail system. Test the system in three different ways to make sure all missed calls go to your new voicemail. Call your phone and let it ring until it goes to voicemail, call your phone and ignore the call by pressing the end or sleep keys, and call your phone while its completely turned off or in airplane mode.

If all of these tests send you to the right mailbox, and all your VMs are pushed to your phone then you’re all done! Another benefit is that you’ll be able to access your voicemail from any device that has your email account.

Notes

  • Some email providers may accidentally mark your voicemails as spam. Test your setup, and if you have trouble receiving your voicemails at your correspondence email try checking the junk folder.
  • If you are with Rogers / Fido and have a voicemail package you might have trouble with the conditional call forwarding setup. It may be necessary to disable voicemail or remove your voicemail feature completely.
  • Depending your plan minutes may be deducted from your monthly bucket. Also, if you’re roaming you may be charged a roaming minute for each time someone hits your voicemail. I suggest never roaming with your Canadian SIM and buying local SIMs instead.

Header photo by Emrah Ömüriş.

VirtualBox “Failed to load..”

Lately I’ve been using the wonderful VirtualBox software to run my Windows virtual machines (Internet Explorer testing etc). It’s just about as good as Parallels or Fusion, but its completely free and open source. What’s not to love?

But once and a while I run into strange errors when trying to boot my VM’s. Errors like “VERR_SUPLIB_WORLD_WRITABLE”, which basically mean the file permissions on some component of VirtualBox are too general.

You can fix most of these errors by opening up Disk Utility (Spotlight search or Applications > Utilities). From there select your system hard drive (likely Macintosh HD) and click Repair Disk Permissions. This process may take a few minutes. When its done restart your computer, open up VirtualBox and you should be good to go!

If you still have trouble, open up the Applications folder and find the VirtualBox app. Right click and open the Get Info screen. At the bottom in the permissions section, make sure “Everyone” only has read access.

Header screenshot by Rafa Espada.

Converting for Apple TV 2

The Apple TV 2 is a great device if you want to stream content from from Apple, Netflix, YouTube or your own iTunes library. But if you’re anything like me–you already have a huge collection of movies and TV shows that were ripped into a slew of formats that don’t play nice with the Apple TV.

So we convert. I’ve found a relatively painless workflow that will allow you to convert your media from just about anything (AVI and MKV included) to Apple friendly formats, and tag it with metadata so you can enjoy film description, movie posters, episode information and more on your Apple TV (just as if you bought it on iTunes). Continue reading

Using PayPal with Coast Capital

You can link PayPal with your Coast Capital Savings account very easily. You’ll need to have two things in order before we start.

To link a new bank account you’ll want to start by opening PayPal and logging in there. Under My Account click Profile, then under Financial Information open Bank Accounts, and from this page click “add”. Depending on your situation, there are a number of ways you can get the rest of the info you’ll need.

Continue reading