I have been attempting to connect to an auto-updating server. I am currently using NodeJS, NPM, Electron Forge, and Vite. I have tried to use MSSQL multiple times, but I run into a circular reference error every time. I’m looking for a solution to how I’m currently doing it or another route.
My process so far in Visual Studio Code
-
npm init electron-app@latest serverTest — –template=vite
-
cd serverTest
-
npm install mssql msnodesqlv8 tedious
-
npm install buffer
-
Paste the sample code given to test
import sql from ‘mssql’;
(async () => {
try {
// make sure that any items are correctly URL encoded in the connection string
await sql.connect(‘Server=localhost,1433;Database=database;User Id=username;Password=password;Encrypt=true’)
const result = await sql.queryselect * from mytable where id = ${value}
console.dir(result)
} catch (err) {
// … error checks
}
})()
6.npm start
7. Uncaught TypeError: Class extends value undefined is not a constructor or null
at node_modules/mssql/lib/base/connection-pool.js (
Kyle Nutter is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.