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–223 runs
build_error
glibcnode 18–223 runs
build_error
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
default
✓ import protobuf from 'rollup-plugin-protobuf'
✗ const protobuf = require('rollup-plugin-protobuf')
ESM only; CommonJS require may fail without .default.
plugin usage
✓ plugins: [ protobuf({ convertFieldsToCamelCase: true }) ]
✗ plugins: [ protobuf.default({ convertFieldsToCamelCase: true }) ]
Default export is directly callable; no .default needed.
import messages
✓ import messages from './messages.proto'
✗ import { messages } from './messages.proto'
Proto files export a default object; named imports won't work.
Shows how to configure the plugin with convertFieldsToCamelCase option and import a .proto file.
import { rollup } from 'rollup';
import protobuf from 'rollup-plugin-protobuf';
async function build() {
const bundle = await rollup({
input: 'src/main.js',
plugins: [
protobuf({ convertFieldsToCamelCase: true })
]
});
await bundle.write({ file: 'dist/bundle.js', format: 'esm' });
}
build();
Errors
Common errors & fixes
Error: Cannot find module 'rollup-plugin-protobuf'
Package not installed or missing from node_modules.
fixRun: npm install --save-dev rollup-plugin-protobuf
Audit
Dependencies
No dependency data recorded yet.