Registry / devops / dlovely-websocket

dlovely-websocket

JSON →
library1.3.6jsnpmunverified

A WebSocket library for Dlovely ecosystem, currently at v1.3.6. Provides WebSocket server and client functionality with TypeScript support. The package has a very slow release cadence, with no activity since 2022. Its primary differentiator is tight integration with the Dlovely framework, but it lacks documentation and has minimal usage. Consider alternatives like ws or uWebSockets.js for production.

npm install dlovely-websocket
INSTALL
IMPORT
SIG · DLOVELY-WEBSOCKET
D
dlovely-websocket
devopsjavascriptv1.3.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.

Server
import { Server } from 'dlovely-websocket'
const Server = require('dlovely-websocket').Server
Works with both ESM and CJS, but TypeScript may require esModuleInterop for CJS.
Client
import { Client } from 'dlovely-websocket'
import Client from 'dlovely-websocket'
Client is a named export, not default.
WebSocket
import { WebSocket } from 'dlovely-websocket'
typeof require('dlovely-websocket')
This is a type export, only available with TypeScript.

Initializes a WebSocket server on port 8080, handles connections, messages, and errors.

import { Server } from 'dlovely-websocket'; const server = new Server({ port: 8080 }); server.on('connection', (client) => { console.log('Client connected'); client.on('message', (data) => { console.log('Received:', data); client.send('Hello from server'); }); client.on('close', () => { console.log('Client disconnected'); }); }); server.on('error', (err) => { console.error('Server error:', err); }); console.log('WebSocket server listening on port 8080');
Debug
Known issues
gotchaPackage has no README or documentation. Usage is derived from source code.
fix
Refer to the source code on GitHub or use alternative libraries like 'ws'.
affects: >=1.0.0
gotchaLow maintenance: last release 2022, no recent updates.
fix
Consider using actively maintained alternatives.
affects: >=1.3.6
breakingRequires TypeScript as a peer dependency (^4.7.4) but may break with newer TypeScript versions.
fix
Use TypeScript 4.7.4 or adjust compiler options.
affects: >=1.0.0
gotchaNo browser support; designed for Node.js only.
fix
Use browser-compatible WebSocket API or 'ws' in Node.
affects: >=1.0.0
Errors
Common errors & fixes
Cannot find module 'dlovely-websocket'
Package not installed or missing from node_modules.
fix
Run npm install dlovely-websocket
TypeError: Server is not a constructor
Incorrect import due to CJS/ESM mismatch.
fix
Use import { Server } from 'dlovely-websocket' (ESM) or const { Server } = require('dlovely-websocket') (CJS).
error TS2304: Cannot find name 'Server'
TypeScript cannot resolve module types.
fix
Ensure TypeScript is installed (npm install typescript) and set 'esModuleInterop': true in tsconfig.
Upgrade
Version history
1.3.6latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
dlovely-websocket — npm install dlovely-websocket · libregistry