###前提・実現したいこと
node.jsでサーバサイドを作りたくて、knex.jsでDBを管理したい
###発生している問題・エラーメッセージ
$ knex migrate:make create_user とコマンド入力しても以下のようなエラーが出る $ knex migrate:make create_user /Users/hiro/Documents/project/nodejs/test3/knexfile.js:14 tableName: 'knex_migrations' ^^^^^^^^^ SyntaxError: Unexpected identifier at exports.runInThisContext (vm.js:73:16) at Module._compile (module.js:443:25) at Object.Module._extensions..js (module.js:478:10) at Module.load (module.js:355:32) at Function.Module._load (module.js:310:12) at Module.require (module.js:365:17) at require (module.js:384:17) at initKnex (/Users/hiro/.nvm/versions/node/v0.12.9/lib/node_modules/knex/lib/bin/cli.js:51:16) at Command.<anonymous> (/Users/hiro/.nvm/versions/node/v0.12.9/lib/node_modules/knex/lib/bin/cli.js:98:15) at Command.listener (/Users/hiro/.nvm/versions/node/v0.12.9/lib/node_modules/knex/node_modules/commander/index.js:301:8) at Command.emit (events.js:110:17) at Command.parseArgs (/Users/hiro/.nvm/versions/node/v0.12.9/lib/node_modules/knex/node_modules/commander/index.js:615:12) at Command.parse (/Users/hiro/.nvm/versions/node/v0.12.9/lib/node_modules/knex/node_modules/commander/index.js:458:21) at Liftoff.invoke (/Users/hiro/.nvm/versions/node/v0.12.9/lib/node_modules/knex/lib/bin/cli.js:143:13) at Liftoff.<anonymous> (/Users/hiro/.nvm/versions/node/v0.12.9/lib/node_modules/knex/node_modules/liftoff/index.js:181:16) at module.exports (/Users/hiro/.nvm/versions/node/v0.12.9/lib/node_modules/knex/node_modules/flagged-respawn/index.js:17:3)
###該当のソースコード
knexfile.js
1// Update with your config settings. 2 3module.exports = { 4 5 development: { 6 client: 'postgresql', 7 connection: { 8 database: 'my_db', 9 user: 'username', 10 password: 'password' 11 }, 12 migrations: { 13 directory: './db/migrations' 14 tableName: 'knex_migrations' 15 } 16 }, 17 18 staging: { 19 client: 'postgresql', 20 connection: { 21 database: 'my_db', 22 user: 'username', 23 password: 'password' 24 }, 25 pool: { 26 min: 2, 27 max: 10 28 }, 29 migrations: { 30 directory: './db/migrations' 31 tableName: 'knex_migrations' 32 } 33 }, 34 35 production: { 36 client: 'postgresql', 37 connection: { 38 database: 'my_db', 39 user: 'username', 40 password: 'password' 41 }, 42 pool: { 43 min: 2, 44 max: 10 45 }, 46 migrations: { 47 tableName: 'knex_migrations' 48 } 49 } 50 51}; 52
###補足情報(言語/FW/ツール等のバージョンなど)
http://qiita.com/YoshiyukiKato/items/59c9ac742536d706b322
上のサイトを参考に作成していました。