Registry / database / nbe-postgres

nbe-postgres

JSON →
library0.2.1jsnpmunverified

Small plugin (v0.2.1) that provides a PostgreSQL interface for the Node Blog Engine (NBE). Minimal documentation and no active maintenance. Likely only useful as a legacy adapter for NBE-based projects. No notable alternatives; tied to the NBE ecosystem.

npm install nbe-postgres
INSTALL
IMPORT
SIG · NBE-POSTGRES
N
nbe-postgres
databasejavascriptv0.2.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
import postgres from 'nbe-postgres'
const postgres = require('nbe-postgres')
Package does not export CommonJS; ESM-only. Also no named exports.
Postgres
import postgres from 'nbe-postgres'
const Postgres = require('nbe-postgres').Postgres
Default export is a class; no named export Postgres exists.
init
import postgres from 'nbe-postgres'; const db = postgres.init(config)
const { init } = require('nbe-postgres')
init is a static method on the default export, not a named export.

Shows how to create a PostgreSQL adapter instance and fetch articles using the Node Blog Engine plugin.

import postgres from 'nbe-postgres'; import { engine } from 'node-blog-engine'; const config = { host: process.env.PGHOST ?? 'localhost', port: parseInt(process.env.PGPORT ?? '5432'), database: process.env.PGDATABASE ?? 'blog', user: process.env.PGUSER ?? 'postgres', password: process.env.PGPASSWORD ?? '' }; const db = new postgres(config); const articles = await db.getArticles(); console.log(articles);
Debug
Known issues
deprecatedPackage is unmaintained and missing type definitions.
fix
Consider using a standalone PostgreSQL ORM like Sequelize or Prisma instead.
affects: >=0.0.0
gotchaAssuming named exports like `{ Postgres }` will cause runtime errors.
fix
Use default import: `import Postgres from 'nbe-postgres'`
affects: >=0.0.0
gotchaCommonJS `require()` may fail due to missing default export in CJS.
fix
Enable ESM in your project or use dynamic import: `const postgres = await import('nbe-postgres')`
affects: >=0.0.0
Errors
Common errors & fixes
Cannot find module 'nbe-postgres'
Package not installed or missing from node_modules.
fix
Run `npm install nbe-postgres`
ERR_REQUIRE_ESM
Attempting to use `require()` on an ESM-only package.
fix
Use `import` syntax or dynamic `import()`
TypeError: nbe_postgres_1.default is not a constructor
Import statement incorrectly destructured named exports.
fix
Use `import Postgres from 'nbe-postgres'` instead of `import { Postgres } from 'nbe-postgres'`
Upgrade
Version history
0.2.1latest on npm
Audit
Dependencies
pgrequiredPostgreSQL client for Node.js
Agent activity
5 hits · last 30 days
node
4
Resources
nbe-postgres — npm install nbe-postgres · libregistry