-
-
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
typeorm cli migrate:run port issue getting "config.options.port" property must be of type number. #6781
Comments
Yeah - looks like that's the case - it doesn't coerce the port to a number when pulling from env to a string. Pull requests welcome :) But we'd need to double check that none of the drivers actually EXPECT a string port. |
As a temporary workaround, are you able to omit the port environment variable? Or stick with the |
the expected type of `port` in all drivers is a number - and in MSSQL this is a problem as the underlying driver does not properly handle a string port - so we have to parseInt closes typeorm#6781
the expected type of `port` in all drivers is a number - and in MSSQL this is a problem as the underlying driver does not properly handle a string port - so we have to parseInt closes typeorm#6781
the expected type of `port` in all drivers is a number - and in MSSQL this is a problem as the underlying driver does not properly handle a string port - so we have to parseInt closes #6781
thankyou we resolved the problem |
the expected type of `port` in all drivers is a number - and in MSSQL this is a problem as the underlying driver does not properly handle a string port - so we have to parseInt closes typeorm#6781
Issue type:
[x ] bug report
[ ] feature request
[ ] documentation issue
Database system/driver:
[ ]
cordova
[ ]
mongodb
[x ]
mssql
[ ]
mysql
/mariadb
[ ]
oracle
[ ]
postgres
[ ]
cockroachdb
[ ]
sqlite
[ ]
sqljs
[ ]
react-native
[ ]
expo
TypeORM version:
[x ]
latest
[ ]
@next
[ ]
0.x.x
(or put your version here)While running the
yarn ts-node ./node_modules/typeorm/cli.js migration:run
facing errorWe are using .env file, which has the typeORM configuration.
Configarations we placed
this our script file from here we are running db.migrate
Solutions we tried
[ * ] This is our folder structure placed
.env
file andormconfig.json
are in same folder but when we are running migrations command it is taking .env file not ormconfig.json[ * ] We tried to giving
yarn ts-node ./node_modules/typeorm/cli.js migration:run -f ormconfig.json
but we are unable to compile[ * ] But by renaming the .env file we are able to compile the command
yarn ts-node ./node_modules/typeorm/cli.js migration:run -f ormconfig.json
[ * ] We tried pass our .env file as configuration, it results the same error
[ * ] Checked in the typeorm git repo in that
ConnectionOptionsEnvReader()
is reading the env variables and in that port is read fromport: PlatformTools.getEnvVariable("TYPEORM_PORT"),
.getEnvVariables is returning a string
.Which may be causing the issue ?
Please help
Thankyou For advance
The text was updated successfully, but these errors were encountered: