You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In 0.2.29 when executing e.g. When executing a CLI query e.g. npx typeorm query -f path/to/ormconfig.js "query" "SELECT 1" we get a TypeError.
Error during query execution:
TypeError: Cannot read property 'replace' of undefined
at escape (/projectPath/node_modules/highlight.js/lib/highlight.js:71:18)
at Object.highlight (/projectPath/node_modules/highlight.js/lib/highlight.js:799:18)
at Object.highlight (/projectPath/node_modules/cli-highlight/dist/index.js:76:21)
at Function.PlatformTools.highlightSql (/projectPath/node_modules/typeorm/platform/PlatformTools.js:186:32)
at Object.<anonymous> (/projectPath/node_modules/typeorm/commands/QueryCommand.js:64:110)
at step (/projectPath/node_modules/tslib/tslib.js:141:27)
at Object.next (/projectPath/node_modules/tslib/tslib.js:122:57)
at fulfilled (/projectPath/node_modules/tslib/tslib.js:112:62)
Expected Behavior
The supplied query is executed:
Running query: SELECT 1
Query has been executed. Result:
[
{
"?column?": 1
}
]
Actual Behavior
A TypeError is thrown
Error during query execution:
TypeError: Cannot read property 'replace' of undefined
at escape (/projectPath/node_modules/highlight.js/lib/highlight.js:71:18)
at Object.highlight (/projectPath/node_modules/highlight.js/lib/highlight.js:799:18)
at Object.highlight (/projectPath/node_modules/cli-highlight/dist/index.js:76:21)
at Function.PlatformTools.highlightSql (/projectPath/node_modules/typeorm/platform/PlatformTools.js:186:32)
at Object.<anonymous> (/projectPath/node_modules/typeorm/commands/QueryCommand.js:64:110)
at step (/projectPath/node_modules/tslib/tslib.js:141:27)
at Object.next (/projectPath/node_modules/tslib/tslib.js:122:57)
at fulfilled (/projectPath/node_modules/tslib/tslib.js:112:62)
Steps to Reproduce
Execute a query through the CLI tool e.g. npx typeorm query -f path/to/ormconfig.js "query" "SELECT 1"
My Environment
Dependency
Version
Operating System
macOS 10.15.5
Node.js version
v14.15.0
Typescript version
v3.9.7
TypeORM version
v0.2.29
Additional Context
Relevant Database Driver(s)
aurora-data-api
aurora-data-api-pg
better-sqlite3
cockroachdb
cordova
expo
mongodb
mysql
nativescript
oracle
postgres
react-native
sap
sqlite
sqlite-abstract
sqljs
sqlserver
Are you willing to resolve this issue by submitting a Pull Request?
Yes, I have the time, and I know how to start.
Yes, I have the time, but I don't know how to start. I would need guidance.
No, I don't have the time, although I believe I could do it if I had the time...
No, I don't have the time and I wouldn't even know how to start.
The text was updated successfully, but these errors were encountered:
Issue Description
In 0.2.29 when executing e.g. When executing a CLI query e.g.
npx typeorm query -f path/to/ormconfig.js "query" "SELECT 1"
we get a TypeError.Expected Behavior
The supplied query is executed:
Actual Behavior
A TypeError is thrown
Steps to Reproduce
npx typeorm query -f path/to/ormconfig.js "query" "SELECT 1"
My Environment
Additional Context
Relevant Database Driver(s)
aurora-data-api
aurora-data-api-pg
better-sqlite3
cockroachdb
cordova
expo
mongodb
mysql
nativescript
oracle
postgres
react-native
sap
sqlite
sqlite-abstract
sqljs
sqlserver
Are you willing to resolve this issue by submitting a Pull Request?
The text was updated successfully, but these errors were encountered: