{"id":48203,"library":"isows","title":"isows","description":"Isomorphic WebSocket implementation that works consistently across Node.js, Bun, Deno, and modern browsers. Version 1.0.7 provides a drop-in replacement for the native WebSocket API, using the 'ws' package on Node.js and the native implementation elsewhere. It is actively maintained by the wevm team (known for viem and wagmi). Unlike raw 'ws', isows provides a universal interface without bundler plugins. It is ESM-only and ships TypeScript definitions. Release cadence is infrequent, focused on stability.","status":"active","version":"1.0.7","language":"javascript","source_language":"en","source_url":"https://github.com/wevm/isows","tags":["javascript","isomorphic","websocket","ws","node","browser","typescript"],"install":[{"cmd":"npm install isows","lang":"bash","label":"npm"},{"cmd":"yarn add isows","lang":"bash","label":"yarn"},{"cmd":"pnpm add isows","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Required peer dependency for Node.js environments; isows uses it as the underlying WebSocket implementation.","package":"ws","optional":false}],"imports":[{"note":"Named export only; no default export.","wrong":"import WebSocket from 'isows'","symbol":"WebSocket","correct":"import { WebSocket } from 'isows'"},{"note":"CommonJS destructured require.","wrong":"const WebSocket = require('isows')","symbol":"WebSocket (in Node.js with require)","correct":"const { WebSocket } = require('isows')"},{"note":"Exported for TypeScript type safety; use from isows, not ws directly.","wrong":"import { CloseEvent } from 'ws'","symbol":"CloseEvent","correct":"import { CloseEvent } from 'isows'"}],"quickstart":{"code":"import { WebSocket } from 'isows'\n\nconst ws = new WebSocket('wss://echo.websocket.org')\n\nws.onopen = () => {\n  console.log('connected')\n  ws.send('Hello, world!')\n}\n\nws.onmessage = (event) => {\n  console.log('Received:', event.data)\n  ws.close()\n}\n\nws.onclose = (event) => {\n  console.log('Disconnected:', event.code, event.reason)\n}\n\nws.onerror = (error) => {\n  console.error('WebSocket error:', error)\n}","lang":"typescript","description":"Creates a WebSocket connection to an echo server, sends a message, and logs the response."},"warnings":[{"fix":"Use dynamic import() or set type: module in package.json if using Node.js with require.","message":"isows is ESM-only since v1.0.0 and does not provide a CommonJS bundle.","severity":"breaking","affected_versions":">=1.0.0"},{"fix":"Always import WebSocket from 'isows' rather than relying on global.","message":"The global WebSocket from 'ws' may be polyfilled; isows always uses its own import.","severity":"deprecated","affected_versions":">=1.0.0"},{"fix":"Install 'ws' alongside isows: npm install isows ws","message":"The 'ws' package must be installed as a peer dependency in Node.js; the package will not work without it.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Test thoroughly on target platforms; consider polyfilling with 'react-native-websocket' if needed.","message":"In React Native or other non-standard environments, the native WebSocket may be used, which has subtle differences in event timing and binary data handling.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"search_vec":"'1.0.7':16 'across':8 'activ':41 'api':27 'browser':14,84 'bun':10 'bundler':61 'cadenc':73 'consist':7 'definit':71 'deno':11 'drop':20 'drop-in':19 'elsewher':38 'esm':66 'esm-on':65 'focus':76 'implement':4,37 'infrequ':75 'interfac':59 'isomorph':2,80 'isow':1,55 'javascript':79 'known':47 'maintain':42 'modern':13 'nativ':25,36 'node':83 'node.js':9,33 'packag':31 'plugin':62 'provid':17,56 'raw':53 'releas':72 'replac':22 'ship':69 'stabil':78 'team':46 'typescript':70,85 'univers':58 'unlik':52 'use':28 'version':15 'viem':49 'wagmi':51 'websocket':3,26,81 'wevm':45 'without':60 'work':6 'ws':30,54,82","created_at":"2026-06-07T16:55:25.730802+00:00","updated_at":"2026-06-07T16:55:25.730802+00:00","problems":[{"fix":"Run npm install isows ws","cause":"Missing dependency; isows not installed or not in node_modules.","error":"Error [ERR_MODULE_NOT_FOUND]: Cannot find module 'isows'"},{"fix":"Use import { WebSocket } from 'isows' instead of import WebSocket from 'isows'","cause":"Incorrect import — using default import instead of named import.","error":"TypeError: WebSocket is not a constructor"},{"fix":"Convert to ESM (type: module) or use dynamic import: const { WebSocket } = await import('isows')","cause":"Using CommonJS require with an ESM-only package.","error":"Error [ERR_REQUIRE_ESM]: require() of ES Module /path/to/isows/index.js not supported"},{"fix":"Run npm install ws","cause":"Missing peer dependency 'ws'.","error":"Module not found: Can't resolve 'ws' in '/path/to/project'"}],"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/wevm/isows#readme","github":"https://github.com/wevm/isows","docs":null,"changelog":null,"pypi":null,"npm":"isows","openapi_spec":null,"status_page":null,"smithery":null,"categories":["storage"],"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}}