Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslnode 18–226 runs
build_error
glibcnode 18–226 runs
build_error
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
default
✓ import bundle from 'bpm-bundle'
✗ const bundle = require('bpm-bundle')
ESM-only package. Default export is the bundler function.
bundle
✓ import { bundle } from 'bpm-bundle'
✗ import bundle from 'bpm-bundle' (if using named export)
Also supports named export for tree-shaking.
type BundleOptions
✓ import type { BundleOptions } from 'bpm-bundle'
✗ import { BundleOptions } from 'bpm-bundle' (runtime error, only a type)
TypeScript users must use 'import type' for interfaces.
Demonstrates importing the default bundler, reading an episode, and writing the output zip file.
import bundle from 'bpm-bundle';
import { readFileSync, writeFileSync } from 'fs';
const episodePath = './my-episode';
const options = { format: 'github', version: '2.1.0' };
try {
const result = bundle(episodePath, options);
console.log('Bundled files:', Object.keys(result));
writeFileSync('./dist/bundle.zip', result.zip);
} catch (err) {
console.error('Bundling failed:', err);
}
bpm-bundle --version
Errors
Common errors & fixes
Error [ERR_MODULE_NOT_FOUND]: Cannot find module 'bpm-bundle'
Package not installed or wrong import path in ESM context
fixRun npm install bpm-bundle and use import syntax.
TypeError: bundle is not a function
Using named import when importing as default
fixUse import bundle from 'bpm-bundle' instead of import { bundle } from 'bpm-bundle'. SyntaxError: Unexpected token 'export'
Using ESM syntax in a CommonJS file
fixAdd "type": "module" to package.json or use require with dynamic import.
Audit
Dependencies
brainpmrequiredCore BPM runtime required for bundling