Recently in the installation of Db-migrate, there is a dependency package sqlite3 how all can not be installed, check down should be due to Node_sqlit3.node file can not be downloaded from Amazon (source installation also error, did not study the reason). Therefore, it is intended to download the installation package installation directly, the following method:
Enter Https://registry.npmjs.org/sqlite3 in the browser
Find http://registry.npmjs.org/sqlite3/-/sqlite3-x.x.x.tgz and download and unzip.
Download the https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v3.1.1/node-v46-darwin-x64.tar.gz and unzip the node The Sqlite3.node is saved to the nodemodules/sqlite3/lib/binding/node-v46-darwin-x64 directory.
Now that the offline installation is complete, run NPM install db-migrate-g directly, and you can install it successfully.
Above
Original: http://lovewindy.com/node-chi-xian-an-zhuang-sqlite3/
Node: Installing Sqlite3 offline in your Mac