現在nestの勉強をしているのですが、データベースを使いたく、TypeORMを用いてデータベースにテーブルを作りたく、マイグレーションファイルを作成するためのコマンドを実行したところ、引数エラーになってしまい躓いてしまいました。
実行したコマンドは以下です。
yarn migration:generate create-user-table
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
エラーは以下です。
$ ts-node -r tsconfig-paths/register node_modules/typeorm/cli.js migration:generate -n create-user-table
cli.js migration:generate <path>
Generates a new migration file with sql needs to be executed to update schema.
オプション:
-h, --help ヘルプを表示 [真偽]
-d, --dataSource Path to the file where your DataSource instance is
defined. [文字列] [必須]
-p, --pretty Pretty-print generated SQL [真偽] [デフォルト: false]
-o, --outputJs Generate a migration file on Javascript instead of
Typescript [真偽] [デフォルト: false]
--dr, --dryrun Prints out the contents of the migration instead of
writing it to a file [真偽] [デフォルト: false]
--ch, --check Verifies that the current database is up to date and that
no migrations are needed. Otherwise exits with code 1.
[真偽] [デフォルト: false]
-t, --timestamp Custom timestamp for the migration name
[数値] [デフォルト: false]
-v, --version バージョンを表示 [真偽]
オプションではない引数が 0 個では不足しています。少なくとも 1 個の引数が必要です:
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
どなたか分かる方いましたら、ご教授いただけると幸いです。

あなたの回答
tips
プレビュー