Skip to content
Advertisement

new – TypeError: undefined is not a Function

I wrote a simple JS node file to query SQLite3 database with information I found on the Internet.

However, I keep running into an error message as shown in the following image.

enter image description here

I have checked other similar questions, but they are not as helpful.

Isn’t new an operator? What am I doing Wrong?

Advertisement

Answer

According to the sqlite3 docs https://www.npmjs.com/package/sqlite3

database starts with an uppercase D as opposed to the lowercase d

so this

should be this

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement