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.
KintoClient
✓ import { KintoClient } from 'kinto-http'
✗ import KintoClient from 'kinto-http'
Default export not available; named import only.
Bucket
✓ import { Bucket } from 'kinto-http'
High-level Bucket class for bucket operations.
Collection
✓ import { Collection } from 'kinto-http'
High-level Collection class for collection operations.
SUPPORTED_PROTOCOL_VERSION
✓ import { SUPPORTED_PROTOCOL_VERSION } from 'kinto-http'
✗ const SUPPORTED_PROTOCOL_VERSION = require('kinto-http').SUPPORTED_PROTOCOL_VERSION
Exported constant; available as named export since v5.
KintoClient (CommonJS)
✓ const { KintoClient } = require('kinto-http')
✗ const KintoClient = require('kinto-http')
CJS users must destructure named exports.
Shows how to initialize a Kinto client, create a bucket/collection, and perform CRUD operations.
import { KintoClient } from 'kinto-http';
const client = new KintoClient('https://kinto.dev.mozaws.net/v1', {
headers: { Authorization: 'Basic ' + btoa('user:pass') }
});
async function main() {
const serverInfo = await client.fetchServerInfo();
console.log('Server:', serverInfo);
const bucket = client.bucket('default');
const collection = bucket.collection('tasks');
// Create a record
const { data } = await collection.createRecord({ title: 'Buy milk', done: false });
console.log('Created record:', data.id);
// List records
const { data: records } = await collection.listRecords();
console.log('Records:', records);
// Update
await collection.updateRecord({ ...data, title: 'Buy almond milk' });
// Delete
await collection.deleteRecord(data.id);
}
main().catch(console.error);
Errors
Common errors & fixes
Cannot find module 'node-fetch'
Peer dependency missing; node-fetch is required for Node.js but not installed automatically.
fixnpm install node-fetch
TypeError: client.fetchServerInfo is not a function
Using a constructor that returns a deprecated version of the client or using an old import pattern.
fixEnsure you are using named import: import { KintoClient } from 'kinto-http' and instantiate with new KintoClient(...). Uncaught ReferenceError: atob is not defined
atob is not available in Node.js; atob peer dependency is missing.
Error: Invalid version: 'v1'
The API version is specified incorrectly; Kinto expects a version segment in the URL (e.g., /v1).
fixEnsure the server URL ends with '/v1' or the correct API version.
Audit
Dependencies
node-fetchrequiredHTTP requests in Node.js (browser uses native fetch)
form-datarequiredMultipart form data for attachment uploads
atobrequiredBase64 decoding (btoa/atob polyfill for Node.js)