-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[0.2.27] Regression: CLI migration:create fails with "TypeError: Cannot read property 'startsWith' of undefined" #6831
Labels
Comments
Issue is that while we're saying the variable directory is a string.. it's not. It's possibly undefined - and via some edge cases it may remain undefined. However, that edge case is that it can't find the configuration. Three things would be helpful here
|
Ah, there's no verbosity or debug logger for these. That's a bummer. |
imnotjames
added a commit
to imnotjames/typeorm
that referenced
this issue
Oct 2, 2020
in some cases - where the connection options couldn't be read - we would end up with the migration:create and similar commands failing with a TypeError this refactors the create commands a bit to defend against an undefined directory, preventing the TypeError fixes typeorm#6831
imnotjames
added a commit
to imnotjames/typeorm
that referenced
this issue
Oct 2, 2020
in some cases - where the connection options couldn't be read - we would end up with the migration:create and similar commands failing with a TypeError this refactors the create commands a bit to defend against an undefined directory, preventing the TypeError fixes typeorm#6831
pleerock
pushed a commit
that referenced
this issue
Oct 6, 2020
in some cases - where the connection options couldn't be read - we would end up with the migration:create and similar commands failing with a TypeError this refactors the create commands a bit to defend against an undefined directory, preventing the TypeError fixes #6831
zaro
pushed a commit
to zaro/typeorm
that referenced
this issue
Jan 12, 2021
in some cases - where the connection options couldn't be read - we would end up with the migration:create and similar commands failing with a TypeError this refactors the create commands a bit to defend against an undefined directory, preventing the TypeError fixes typeorm#6831
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Issue type:
[*] bug report
[ ] feature request
[ ] documentation issue
Database system/driver:
[ ]
cordova
[ ]
mongodb
[ ]
mssql
[*]
mysql
/mariadb
[ ]
oracle
[ ]
postgres
[ ]
cockroachdb
[ ]
sqlite
[ ]
sqljs
[ ]
react-native
[ ]
expo
TypeORM version:
[*]
latest
[ ]
@next
[ ]
0.x.x
(or put your version here)Steps to reproduce or a small repository showing the problem:
Run (with
TYPEORM_MIGRATIONS_DIR=src/migrations
in.env
):node --require ts-node/register ./node_modules/typeorm/cli.js -- migration:create -n SomeName
Or even:
TYPEORM_MIGRATIONS_DIR=src/migrations node --require ts-node/register ./node_modules/typeorm/cli.js -- migration:create -n SomeName
Neither works. Only if I specify
-d
migration dir argument explicitly, it would create that migration.Complete error output follows:
The text was updated successfully, but these errors were encountered: