{"id":14677,"library":"livereload-server","title":"LiveReload Server (Node.js - Legacy)","description":"This entry describes the `livereload-server` package at version `0.2.3`, an extremely early and now effectively abandoned implementation of the LiveReload 3 web socket and HTTP server for Node.js. It targets Node.js versions `>= 0.6.0`, which are long past end-of-life and present significant security vulnerabilities and compatibility issues with modern JavaScript ecosystems. While its purpose was to provide real-time browser reloading during development upon file changes, this specific package version is not suitable for contemporary projects. Developers seeking LiveReload functionality in Node.js should instead use the more actively maintained `livereload` npm package (currently v0.10.x), which serves as its spiritual successor under the same LiveReload organization. This library is primarily of historical interest.","status":"abandoned","version":"0.2.3","language":"javascript","source_language":"en","source_url":"git://github.com/livereload/livereload-server","tags":["javascript"],"install":[{"cmd":"npm install livereload-server","lang":"bash","label":"npm"},{"cmd":"yarn add livereload-server","lang":"bash","label":"yarn"},{"cmd":"pnpm add livereload-server","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"This package is CommonJS-only, as it predates Node.js's native ESM support. Direct ESM imports will fail.","wrong":"import { createServer } from 'livereload-server';","symbol":"createServer","correct":"const livereload = require('livereload-server');\nconst server = livereload.createServer();"},{"note":"TypeScript type definitions are not available for this abandoned package version. Manual inspection of the source or relying on JavaScript object literals is necessary. Modern alternatives offer robust typing.","symbol":"ServerOptions","correct":"// Type definitions are not available for this legacy version.\n// Refer to documentation for expected object structure."}],"quickstart":{"code":"const livereload = require('livereload-server');\n\nconst server = livereload.createServer({\n  port: 35729, // Default LiveReload port\n  // No specific options were common for this extremely old version, \n  // and its internal implementation details are obscure.\n  // Modern 'livereload' package options (like 'exts', 'delay', 'https') are not applicable here.\n});\n\n// In a real scenario, you'd integrate this with a simple HTTP server\n// to serve static files and inject the LiveReload client script.\n// For Node.js 0.6, this would likely involve Node's built-in http module.\n// Example (highly simplified, assumes a server is already serving files):\n// This package typically *only* provides the websocket part.\n\nconsole.log('LiveReload server (legacy 0.2.3) started on port 35729.');\nconsole.log('Ensure your browser extension or client-side script is configured to connect to this port.');\nconsole.log('Note: This package is for historical context; use the `livereload` npm package for modern projects.');","lang":"javascript","description":"Demonstrates how to start the legacy LiveReload server. This code is illustrative of its use but is not recommended for modern development due to severe age-related issues."},"warnings":[{"fix":"Do not use this package. Migrate to the `livereload` npm package (v0.10.x) for Node.js-based LiveReload servers or use a modern alternative like `live-server` for static file serving with LiveReload functionality.","message":"This `livereload-server` package (v0.2.3) is extremely old and explicitly requires Node.js version '>= 0.6.0'. It is highly incompatible with modern Node.js runtimes (e.g., Node.js 14+), and attempting to install or run it will likely result in numerous errors related to deprecated APIs, missing modules, or syntax incompatible with current V8 engines.","severity":"breaking","affected_versions":"<=0.2.3"},{"fix":"Discontinue use immediately. For secure and feature-rich LiveReload capabilities, use the `livereload` npm package or other maintained tools.","message":"This package is effectively abandoned and has not received updates for over a decade. It likely contains unpatched security vulnerabilities, performance inefficiencies, and lacks support for modern web development practices or browser features. Running it in any environment is a security risk.","severity":"gotcha","affected_versions":"<=0.2.3"},{"fix":"If you intend to use a LiveReload server in Node.js, install `npm install livereload` instead of `npm install livereload-server`. Consult the documentation for the `livereload` package for correct usage.","message":"There is a common confusion between `livereload-server` (this package, version 0.2.3) and the more actively maintained `livereload` npm package (version 0.10.x, last published 8 months ago). Although both are related to LiveReload and originate from the same organization, the `livereload` npm package is the current, albeit CoffeeScript-based, Node.js implementation for LiveReload server functionality.","severity":"gotcha","affected_versions":"<=0.2.3"}],"env_vars":null,"last_verified":"2026-04-19T00:00:00.000Z","next_check":"2026-07-18T00:00:00.000Z","problems":[{"fix":"Ensure you have installed the correct package: `npm install livereload` for the modern server, or explicitly install this legacy package if absolutely necessary (not recommended). Double-check your `require()` path.","cause":"The package `livereload-server` is not widely used or actively maintained and might not be correctly installed or resolved by modern npm/Node.js environments, especially if attempting to use the newer `livereload` package as 'livereload-server'.","error":"Error: Cannot find module 'livereload-server'"},{"fix":"Verify that `livereload-server` is installed. If using a modern Node.js version, this package is likely incompatible; consider migrating to the `livereload` npm package which provides a `createServer` function as its primary API.","cause":"This error occurs if the `require('livereload-server')` call does not return an object with a `createServer` method, possibly due to a botched installation, an incorrect package being loaded, or fundamental incompatibility with the Node.js runtime.","error":"TypeError: createServer is not a function"},{"fix":"Change the port for the LiveReload server if the option is available (this legacy package may not support it robustly). For the modern `livereload` package, configure `createServer({ port: YOUR_NEW_PORT })`. Alternatively, ensure no other LiveReload or development servers are running.","cause":"The default LiveReload port (35729) is already in use by another application, which is a common issue with development servers.","error":"events.js:72\n        throw er; // Unhandled 'error' event\n              ^ \nError: listen EADDRINUSE :::35729"}],"ecosystem":"npm"}