app-generator / api-server-nodejs

Nodejs API Server - Express / SQLite / TypeORM | AppSeed
https://appseed.us/boilerplate-code/nodejs-starter/
Other
227 stars 87 forks source link

SQLite migration via TypeORM Missing required argument: dataSource #29

Open AdamWP opened 7 months ago

AdamWP commented 7 months ago

OS: MacOS 14.1.1 (23B81) AND Ubuntu 22.04 Node Version: 16, 18, and 20

When running the following during step 3 of the installation: $ npm run typeorm migration:run // OR $ yarn typeorm migration:run

I get the following error on multiple OSs and versions of node:

npm run typeorm migration:run

api-server-nodejs@1.0.0 typeorm node --require ts-node/register ./node_modules/typeorm/cli.js migration:run

cli.js migration:run

Runs all pending migrations.

Options: -h, --help Show help [boolean] -d, --dataSource Path to the file where your DataSource instance is defined. [required] -t, --transaction Indicates if transaction should be used or not for migration run. Enabled by default. [default: "default"] -f, --fake Fakes running the migrations if table schema has already been changed manually or externally (e.g. through another project) [boolean] [default: false] -v, --version Show version number [boolean]

Missing required argument: dataSource