lumioL
Denoβ€’8mo agoβ€’
30 replies
lumio

NPM package "pg@8.16.0" does not define an export ".".

Hello everyone!

I'm relatively new to the deno world and am currently trying to create a simple CRUD API with Fresh.

I followed this article: https://deno.com/blog/build-database-app-drizzle and installed pg with deno install npm:pg. However when trying to import it in any form from

import { Pool } from "pg"; // or "npm:pg"
// or
import pg from "pg"; // or "npm:pg"


my VSCode prints out an error saying NPM package "pg@8.16.0" does not define an export ".".

Does anyone know how to fix this or work around this?
Deno
Using an object-relational mapping (ORM) database can make working with persistent data simpler. Here's how to use a popular ORM, Drizzle, with Deno.
Build a Database App with Drizzle ORM and Deno | Deno
Was this page helpful?