{"id":25745,"library":"ihub-framework-ts","title":"iHub Framework","description":"iHub Framework is a Node.js microservices framework designed for the iHub ecosystem. Version 2.2.3 is the current stable release. It provides tools for building microservices with Docker and Kubernetes, including graceful shutdown, environment variable configuration for project, Node.js environment, and logger settings (Elasticsearch and console). The framework is in active development (WIP) and is distributed via a private npm registry. It ships TypeScript types and is primarily used internally within Infracommerce.","status":"active","version":"2.2.3","language":"javascript","source_language":"en","source_url":null,"tags":["javascript","typescript"],"install":[{"cmd":"npm install ihub-framework-ts","lang":"bash","label":"npm"},{"cmd":"yarn add ihub-framework-ts","lang":"bash","label":"yarn"},{"cmd":"pnpm add ihub-framework-ts","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"ESM only; CommonJS require may not work reliably.","wrong":"const Application = require('ihub-framework-ts').Application","symbol":"Application","correct":"import { Application } from 'ihub-framework-ts'"},{"note":"Logger is a named export, not default.","wrong":"import Logger from 'ihub-framework-ts'","symbol":"Logger","correct":"import { Logger } from 'ihub-framework-ts'"},{"note":"Export path is incorrect; must use the package directly.","wrong":"import { Config } from 'ihub-framework-ts/Config'","symbol":"Config","correct":"import { Config } from 'ihub-framework-ts'"}],"quickstart":{"code":"import { Application, Logger } from 'ihub-framework-ts';\n\nconst app = new Application({\n  projectName: process.env.PROJECT_NAME ?? 'my-service',\n  nodeEnv: process.env.NODE_ENV ?? 'development',\n});\n\nconst logger = new Logger({\n  elasticsearch: {\n    enabled: process.env.LOGGER_ELASTICSEARCH_ENABLED === 'true',\n    url: process.env.LOGGER_ELASTICSEARCH_URL ?? '',\n    level: process.env.LOGGER_ELASTICSEARCH_LEVEL ?? 'info',\n  },\n  console: {\n    level: process.env.LOGGER_CONSOLE_LEVEL ?? 'debug',\n  },\n});\n\napp.use(logger);\n\napp.start();","lang":"typescript","description":"Initializes the Application and Logger with environment variables, then starts the service."},"warnings":[{"fix":"Create a .npmrc file pointing to the private registry.","message":"Framework requires a private npm registry (registry.infracommerce.com.br). You must have access to that registry to install the package.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Install Docker and Docker Compose and use them for development.","message":"Docker is required for development; local Node.js 8+ is discouraged but possible.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Ensure LOGGER_ELASTICSEARCH_ENABLED is set to false if not using Elasticsearch.","message":"The framework uses a custom logger that expects Elasticsearch configuration. If not set, it may fail silently.","severity":"gotcha","affected_versions":">=0.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Ensure you have .npmrc with registry=https://registry.infracommerce.com.br/repository/npm-local/ and have access.","cause":"The package is only available in a private npm registry.","error":"Module not found: Can't resolve 'ihub-framework-ts'"},{"fix":"Use named imports: import { Application, Logger } from 'ihub-framework-ts'","cause":"Application or Logger not imported correctly.","error":"TypeError: Cannot read property 'start' of undefined"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}