{"id":49625,"library":"ut-wss","title":"ut-wss","description":"UT-WSS is a lightweight WebSocket server built on the WS library, providing a minimal wrapper for creating WebSocket connections in Node.js. The current stable version is 1.0.4, released on an irregular cadence as part of the UT ecosystem. It differentiates from raw 'ws' by offering utility functions and integration with the UT framework, but it is not actively maintained beyond minor patches.","status":"maintenance","version":"1.0.4","language":"javascript","source_language":"en","source_url":"ssh://git@github.com/softwaregroup-bg/ut-wss","tags":["javascript","websockets","socket server"],"install":[{"cmd":"npm install ut-wss","lang":"bash","label":"npm"},{"cmd":"yarn add ut-wss","lang":"bash","label":"yarn"},{"cmd":"pnpm add ut-wss","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Core WebSocket implementation, ut-wss wraps the ws library.","package":"ws","optional":false}],"imports":[{"note":"Package is ESM-only; CommonJS require will fail.","wrong":"const WebSocketServer = require('ut-wss');","symbol":"default","correct":"import WebSocketServer from 'ut-wss';"},{"note":"Default export, not named export.","wrong":"import { WebSocketServer } from 'ut-wss';","symbol":"WebSocketServer","correct":"import WebSocketServer from 'ut-wss';"},{"note":"No named export 'createServer'; use default import.","wrong":"const createServer = require('ut-wss').createServer;","symbol":"createServer","correct":"import createServer from 'ut-wss';"}],"quickstart":{"code":"import WebSocketServer from 'ut-wss';\n\nconst server = new WebSocketServer({ port: 8080 });\n\nserver.on('connection', (ws, req) => {\n  console.log('Client connected');\n  ws.on('message', (data) => {\n    console.log('Received:', data.toString());\n    ws.send('Hello from server');\n  });\n});\n\nconsole.log('WebSocket server running on port 8080');","lang":"typescript","description":"Creates a WebSocket server on port 8080, logs connections and echoes messages back."},"warnings":[{"fix":"Update Node.js to >=12 and ensure 'ws' version in package.json is at least 7.0.0.","message":"Breaking change: Ut-wss 1.0+ requires Node.js >= 12 and the 'ws' version must be >= 7.0.0.","severity":"breaking","affected_versions":">=1.0.0"},{"fix":"Install @types/ws as a devDependency.","message":"The package does not export TypeScript types; users must install @types/ws separately.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Use the 'noServer' option instead.","message":"The 'server' option in constructor is deprecated in favor of 'noServer' and manual upgrade.","severity":"deprecated","affected_versions":">=1.0.0"},{"fix":"Convert to string with data.toString() or set 'binaryType' to 'blob' on client side.","message":"Event listener for 'message' receives data as Buffer; must call .toString() to get string.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"search_vec":"'1.0.4':32 'activ':63 'beyond':65 'built':12 'cadenc':37 'connect':24 'creat':22 'current':28 'differenti':45 'ecosystem':43 'framework':58 'function':52 'integr':54 'irregular':36 'javascript':68 'librari':16 'lightweight':9 'maintain':64 'minim':19 'minor':66 'node.js':26 'offer':50 'part':39 'patch':67 'provid':17 'raw':47 'releas':33 'server':11,71 'socket':70 'stabl':29 'ut':2,5,42,57 'ut-wss':1,4 'util':51 'version':30 'websocket':10,23,69 'wrapper':20 'ws':15,48 'wss':3,6","created_at":"2026-06-07T17:02:44.042288+00:00","updated_at":"2026-06-07T17:02:44.042288+00:00","problems":[{"fix":"Run 'npm install ut-wss' and ensure Node >= 12, or use CommonJS with dynamic import().","cause":"Package not installed or Node version < 12 (ESM not supported).","error":"Error: Cannot find module 'ut-wss'"},{"fix":"Use default import: import WebSocketServer from 'ut-wss';","cause":"Using named import instead of default import (e.g., import { WebSocketServer } from 'ut-wss').","error":"TypeError: WebSocketServer is not a constructor"},{"fix":"Use 'ut-wss' package instead of raw 'ws' import.","cause":"Incorrectly importing from 'ws' directly instead of using ut-wss wrapper.","error":"Error: Module \"ws\" does not provide an export named 'WebSocketServer'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/softwaregroup-bg/ut-wss#readme","github":"ssh://git@github.com/softwaregroup-bg/ut-wss","docs":null,"changelog":null,"pypi":null,"npm":"ut-wss","openapi_spec":null,"status_page":null,"smithery":null,"categories":["messaging"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}