I've been hacking around trying to get the Node bindings to work today. It appears that uniffi-bindgen-node generates bindings that import the runtime from uniffi-bindgen-react-native:
import { ... } from "uniffi-bindgen-react-native";
This makes the generated package unusable on Node 24, because uniffi-bindgen-react-native resolves its main entrypoint to a TypeScript file under node_modules:
{
"main": "./typescript/src/index.ts"
}
Node 24 rejects that at runtime with:
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"
Repro
Environment:
- uniffi-bindgen-node 0.1.4
- Node v24.3.0
Generate bindings for any UniFFI crate, build the generated package, then try to load it:
require("./dist/uniffi/generated/index.js")
This fails before user code runs because the generated binding transitively requires uniffi-bindgen-react-native, whose runtime entrypoint is a .ts file in node_modules.
I'm not sure what the best way to address this is. It appears that @jhugman has published uniffi-runtime-javascript, but this doesn't work for uniffi-bindgen-node since it's for WASM runtimes only.
I've been hacking around trying to get the Node bindings to work today. It appears that
uniffi-bindgen-nodegenerates bindings that import the runtime fromuniffi-bindgen-react-native:import { ... } from "uniffi-bindgen-react-native";
This makes the generated package unusable on Node 24, because
uniffi-bindgen-react-nativeresolves its main entrypoint to a TypeScript file under node_modules:{
"main": "./typescript/src/index.ts"
}
Node 24 rejects that at runtime with:
Repro
Environment:
Generate bindings for any UniFFI crate, build the generated package, then try to load it:
require("./dist/uniffi/generated/index.js")
This fails before user code runs because the generated binding transitively requires
uniffi-bindgen-react-native, whose runtime entrypoint is a .ts file in node_modules.I'm not sure what the best way to address this is. It appears that @jhugman has published uniffi-runtime-javascript, but this doesn't work for
uniffi-bindgen-nodesince it's for WASM runtimes only.