-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Open
Description
when running this package inside an ESM project, I got this error
import { Pool } from 'pg';
^^^^
SyntaxError: Named export 'Pool' not found. The requested module 'pg' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:
import pkg from 'pg';
const { Pool } = pkg;
at ModuleJob._instantiate (node:internal/modules/esm/module_job:124:21)
at async ModuleJob.run (node:internal/modules/esm/module_job:190:5)
using the suggested form import pkg from 'pg';
disables the tree-shaking
mpblewitt, Zwiqler94, gilles-crealp, erakis, romulovalez and 14 more
Metadata
Metadata
Assignees
Labels
No labels