Skip to content

@agntcy/slim-bindings (Node) can't be loaded from plain Node.js — broken by a transitive dependency's packaging #1916

Description

@ruvnet

What happened

Following this repo's own @agntcy/slim-bindings README (which documents plain Node.js usage, npm install @agntcy/slim-bindings then import slimBindings from '@agntcy/slim-bindings'), loading the package throws immediately:

Error [ERR_UNSUPPORTED_NODE_MODULES_TYPE_STRIPPING]: Stripping types is currently unsupported for files under node_modules, for ".../node_modules/uniffi-bindgen-react-native/typescript/src/index.ts"

Root cause (found and reported upstream)

@agntcy/slim-bindings's platform packages (e.g. @agntcy/slim-bindings-linux-x64-gnu) declare uniffi-bindgen-react-native as a runtime dependencies entry — the generated bindings import { ... } from 'uniffi-bindgen-react-native' for FFI converter helpers. That package's own package.json points "main" directly at raw, uncompiled TypeScript (./typescript/src/index.ts) with no build output — which only works inside a bundler (Metro, for its primary React Native use case), not plain Node require/import. Filed against that repo directly: jhugman/uniffi-bindgen-react-native#422

Impact here

This means @agntcy/slim-bindings currently can't be used from plain Node.js at all, despite the README documenting exactly that. Wanted to flag it here too in case this repo has any leverage with that dependency, or wants to vendor/patch the runtime helper import in the meantime — happy to help test either.

Found this while integrating @agntcy/slim-bindings into a project (real client code written against the documented API, blocked only by this load-time failure). The rest of the documented API surface (initializeWithDefaults, getGlobalService/createService, App.newWithSecret, connectAsync, runServer, etc.) looks solid and well-typed from the shipped .d.ts — this is purely a packaging/dependency issue, not a design one.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

Status
Backlog
Status
No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions