Missing modules for NPM Packages

Hi,

I’ve just started using npm packages in my velo code, and am running into some troubles. I am trying to use the ‘pg’ package (node-postgres). I can install the package without any issues (pg is one of the already approved npm packages and after installation it shows up under my npm packages).

My code is super simple:

// Import pg package
import 'pg';

// Just print hello to the world
$w.onReady(async function () {
    console.log('hello world');
});

However, when I then try to run the package I get the following error message:
“Cannot find module ‘fs’ in ‘bindings’”

Any thoughts on how I can deal with this? Thanks up front for any help you can provide!

See: