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 uiFramework from 'ui-framework-jps'
✗ const uiFramework = require('ui-framework-jps')
ESM-only package; CommonJS require may lead to default import issues.
Component
✓ import { Component } from 'ui-framework-jps'
✗ import Component from 'ui-framework-jps'
Named export Component must be destructured.
StateManager
✓ import { StateManager } from 'ui-framework-jps'
✗ const StateManager = require('ui-framework-jps').StateManager
Use import statement for tree-shaking.
This quickstart shows how to initialize the framework, use state management, and render a simple React component.
import uiFramework from 'ui-framework-jps';
import { Component, StateManager } from 'ui-framework-jps';
// Initialize with API server URL
const app = uiFramework.init({
API_SERVER_URL: process.env.API_SERVER_URL ?? 'http://localhost:3000',
DEBUG: true,
});
// Create a simple component
const MyComponent = () => {
const state = StateManager.useState('counter');
return (
<div>
<p>Count: {state.value}</p>
<button onClick={() => state.set(state.value + 1)}>Increment</button>
</div>
);
};
app.render('#root', MyComponent);
Errors
Common errors & fixes
TypeError: uiFramework.createApp is not a function
Version >=2.0.0 changed the API to uiFramework.init.
fixReplace createApp with init.
Error: Cannot find module 'react'
React is a peer dependency but not installed.
fixRun npm install react react-dom.
Module not found: Error: Can't resolve 'socket.io'
Socket.io is a required dependency.
fixRun npm install socket.io.
Audit
Dependencies
reactrequiredUI component rendering
socket.iorequiredReal-time communication
expressrequiredServer framework
mongodbrequiredDatabase