Registry / devops / octopusjs-framework

octopusjs-framework

JSON →
library1.8.6jsnpmunverified

OctopusJS (v1.8.6) is a high-performance, distributed intelligence frontend framework that lets developers build encapsulated components using pure HTML, CSS, and JavaScript. It adds no abstractions over native web APIs, resulting in near-vanilla JS performance (~54.8ms for 1k items) and a tiny 6.4kB gzipped footprint. Unlike traditional frameworks (React, Vue, Angular), OctopusJS distributes logic across Octopus Components with scoped styles and templates, has zero dependencies, and is compatible with any other library or backend. Release cadence is irregular; the package has been stable but not actively updated recently.

npm install octopusjs-framework
INSTALL
IMPORT
SIG · OCTOPUSJS-FRAMEWOR
O
octopusjs-framework
devopsjavascriptv1.8.6
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Octopus
import { Octopus } from 'octopusjs-framework'
const Octopus = require('octopusjs-framework')
ESM import is required; CommonJS require is not supported.
OctopusComponent
import { OctopusComponent } from 'octopusjs-framework/component'
import { OctopusComponent } from 'octopusjs-framework'
OctopusComponent is exported from a subpath; the main package exports only Octopus.
defineComponent
import { defineComponent } from 'octopusjs-framework'
Also exported as default in older versions; prefer named export.

Shows how to define a custom OctopusJS component with template, style, and script, and initialize the framework.

import { Octopus, defineComponent } from 'octopusjs-framework'; // Define a custom component const MyComponent = defineComponent({ name: 'my-component', template: '<p>Hello Octopus!</p>', style: 'p { color: blue; }', script: () => { console.log('Component mounted'); } }); // Initialize Octopus with the component const app = new Octopus({ components: [MyComponent] }); app.init(); // In HTML: <my-component></my-component>
Debug
Known issues
gotchaESM-only package: OctopusJS is published as ES modules only. You cannot use require() to import it; you must use import syntax or configure your bundler accordingly.
fix
Use import instead of require. If using Node.js, ensure 'type': 'module' in package.json or use .mjs extension.
affects: >=1.0.0
breakingVersion 1.3.0 changed the default export to named exports. Older import patterns like `import Octopus from 'octopusjs-framework'` will break.
fix
Use named imports: import { Octopus, defineComponent } from 'octopusjs-framework'.
affects: >=1.3.0
deprecatedThe `createComponent` function was deprecated in v1.5.0 and removed in v1.6.0. Use `defineComponent` instead.
fix
Replace createComponent with defineComponent.
affects: >=1.5.0 <1.6.0
gotchaComponent names must include a hyphen (kebab-case) as per web component specifications. OctopusJS enforces this and will throw an error otherwise.
fix
Use at least one hyphen in the component name, e.g., 'my-component'.
affects: >=1.0.0
gotchaOctopusJS does not support server-side rendering (SSR). It is purely client-side and relies on the DOM API at runtime.
fix
Use only for browser environments. Avoid SSR-related tools or pre-rendering.
affects: >=1.0.0
Errors
Common errors & fixes
TypeError: Octopus is not a constructor
Using CommonJS require or incorrect import (e.g., default import on named export).
fix
Use named import: import { Octopus } from 'octopusjs-framework'
Error: Invalid component name. Must contain a hyphen.
Component name does not follow kebab-case convention required for web components.
fix
Rename component to include a hyphen, e.g., 'my-component'
Uncaught SyntaxError: The requested module 'octopusjs-framework' does not provide an export named 'default'
Using default import on a package that only exports named exports (since v1.3.0).
fix
Use named import: import { Octopus } from 'octopusjs-framework'
Upgrade
Version history
1.8.6latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
octopusjs-framework — npm install octopusjs-framework · libregistry