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
I have installed msnodesqlv8 but when I am trying to run the following script I am getting the error "Cannot find module 'msnodesqlv8/types' or its corresponding type declarations." on the first import line against 'msnodesqlv8/types'. Please help as this is something urgent I am using node version v21.4.0
import { SqlClient } from 'msnodesqlv8/types'
const sql: SqlClient = require('msnodesqlv8')
const connectionString = 'server=.;Database=Master;Trusted_Connection=Yes;Driver={SQL Server Native Client 11.0}'
const query = 'SELECT name FROM sys.databases'
I have installed msnodesqlv8 but when I am trying to run the following script I am getting the error "Cannot find module 'msnodesqlv8/types' or its corresponding type declarations." on the first import line against 'msnodesqlv8/types'. Please help as this is something urgent I am using node version v21.4.0
import { SqlClient } from 'msnodesqlv8/types'
const sql: SqlClient = require('msnodesqlv8')
const connectionString = 'server=.;Database=Master;Trusted_Connection=Yes;Driver={SQL Server Native Client 11.0}'
const query = 'SELECT name FROM sys.databases'
sql.query(connectionString, query, (err, rows) => {
if (err != null) {
console.error(err)
} else {
console.log(rows)
}
})
The text was updated successfully, but these errors were encountered: