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
TypeError: str.replace is not a function #4798
Comments
Any solution? |
akosasante
pushed a commit
to akosasante/typeorm
that referenced
this issue
Sep 9, 2020
enforce the type of the name argument in order to return a more useful error message when the user forgets to provide a migration name to the generate migration command Closes: typeorm#2719, typeorm#4798, typeorm#4805
akosasante
pushed a commit
to akosasante/typeorm
that referenced
this issue
Sep 9, 2020
…ssing name argument enforce the type of the name argument in order to return a more useful error message when the user forgets to provide a migration name to the generate migration command Closes: typeorm#2719, typeorm#4798, typeorm#4805
pleerock
pushed a commit
that referenced
this issue
Sep 26, 2020
* fix: enforce name argument of migration generate command enforce the type of the name argument in order to return a more useful error message when the user forgets to provide a migration name to the generate migration command Closes: #2719, #4798, #4805 * fix: update error message text for generate migration command when missing name argument enforce the type of the name argument in order to return a more useful error message when the user forgets to provide a migration name to the generate migration command Closes: #2719, #4798, #4805 Co-authored-by: Akosua Asante <akosuaasante@gmail.com>
zaro
pushed a commit
to zaro/typeorm
that referenced
this issue
Jan 12, 2021
… (typeorm#6690) * fix: enforce name argument of migration generate command enforce the type of the name argument in order to return a more useful error message when the user forgets to provide a migration name to the generate migration command Closes: typeorm#2719, typeorm#4798, typeorm#4805 * fix: update error message text for generate migration command when missing name argument enforce the type of the name argument in order to return a more useful error message when the user forgets to provide a migration name to the generate migration command Closes: typeorm#2719, typeorm#4798, typeorm#4805 Co-authored-by: Akosua Asante <akosuaasante@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Issue type:
[ ] question
[x ] bug report
[ ] feature request
[ ] documentation issue
Database system/driver:
[ ]
cordova
[ ]
mongodb
[ ]
mssql
[ ]
mysql
/mariadb
[ ]
oracle
[x ]
postgres
[ ]
cockroachdb
[ ]
sqlite
[ ]
sqljs
[ ]
react-native
[ ]
expo
TypeORM version:
[x ]
latest
[ ]
@next
[ ]
0.x.x
(or put your version here)Steps to reproduce or a small repository showing the problem:
https://github.com/joalorro/typeorm-cli-bug
I'm currently attempting to have a Node file programmatically generate migrations via the TypeORM CLI, but I get the error "TypeError: str.replace is not a function". When running the same command via NPM, the migration is successfully created.
I console.log'd the variable "args" within MigrationGenerateCommand.js on line 92 (below "case 8:") and found that it looks like:
when it should look like:
The latter object is produced when running the package.json scripts, and String.replace is attempting to run on args.name, which is now a boolean.
Node command:
node migration.js initial
NPM command:
npm run typeorm:migrate initial
The text was updated successfully, but these errors were encountered: