NodeJS Repl.it Database Error [CLOSED]
lightningrock

When I try to use repl.it's database in NodeJS, which I import on lines 8 and 9, it says the @replit/database modules wasn't found.
Error:

You are viewing a single comment. View All
RYANTADIPARTHI

uh, everything seems to be working.

lightningrock

I've commented it out, because otherwise it won't run. @RYANTADIPARTHI

RYANTADIPARTHI

@lightningrock well, one problem is the import.import repl db like this.

not exactly like that, but in node js, import it properly. Not /

lightningrock

But replit says to import it like this:

Anyways how do I do it without the /?

@RYANTADIPARTHI

Pankak

@RYANTADIPARTHI thats python, he's using nodes

RYANTADIPARTHI

@lightningrock maybe this.

Pankak

@lightningrock I am fairly certain this is a bug unless you did something super wacky to mess up the file structures

lightningrock

@Pankak @RYANTADIPARTHI It's working now. For some reason when I did require("@replit/database"), it didn't automatically install the package. I've installed it manually and it works now.

Pankak

@lightningrock alright, yeah you want to learn to manually install, repl is whacky sometimes

RYANTADIPARTHI

@lightningrock ok good.