Repl db node.js v3

Problem description

repl db in node.js repl doesn’t work.
After following the same instructions as always it now says:
“Database is not a constructor”
I i bump down to version 2.0.5 it works fine.

Expected behavior

const Database = require("@replit/database")
const db = new Database()

Actual behavior

const db = new Database();
           ^

TypeError: Database is not a constructor
    at Object.<anonymous> (/home/runner/db-test-bence/index.js:2:12)

Steps to reproduce

In index.js type:

const Database = require("@replit/database")
const db = new Database()

Browser

Chrome

OS

Windows 10

Device if mobile

N/A

Plan

Free

@FredricPersson2 Thanks for reporting. I’ll take a look with the team.

Just a quick update that this has been addressed. You can upgrade to v3.0.1 and the code should work again.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.