どうやら環境によっては以下のエラーが出る。
../base64.cc:138: error: 'malloc' was not declared in this scope ../base64.cc:141: error: 'free' was not declared in this scope
■解決策
ソースをダウンロードしbase64.ccに以下のラインを追加する。
#import <stdlib.h>
その後、以下のコマンドでインストールする。
npm install dir/
最後のスラッシュは必要なかったかもしれない。