Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslnode 18–226 runs
build_error
glibcnode 18–226 runs
build_error
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
programmatic API
✓ import { default as aliveServer } from 'alive-server';
✗ const aliveServer = require('alive-server');
The package is a CLI tool, but it can be used programmatically via CommonJS require. No default export; use require().
liveServer
✓ const liveServer = require('alive-server'); exports the start function
✗ import { liveServer } from 'alive-server';
Only CommonJS require works; no named export 'liveServer'.
start
✓ const { start } = require('alive-server');
✗ import { start } from 'alive-server';
The module exports a 'start' function via CommonJS. ESM import is not supported directly.
params
✓ const params = require('alive-server').params;
✗ import { params } from 'alive-server';
params is an object exported via module.exports, only accessible via require.
Shows both CLI and programmatic usage of alive-server with custom port, ignored files, and middleware.
// Install globally: npm install -g alive-server
// Then serve current directory:
// alive-server --port=3000 --open=/index.html --no-browser
// Programmatic usage (CommonJS):
const liveServer = require('alive-server');
const params = {
port: 9000,
host: '0.0.0.0',
root: process.cwd(),
open: false,
ignore: '*.scss',
file: 'index.html',
wait: 100,
mount: [['/components', './node_modules']],
logLevel: 2,
middleware: [function(req, res, next) {
next();
}]
};
liveServer.start(params);
alive-server --version
Errors
Common errors & fixes
Error: Cannot find module 'send'
Missing dependency 'send' when using programmatic API without installing dependencies.
fixRun 'npm install send' in your project or ensure alive-server is installed globally with all dependencies.
TypeError: liveServer.start is not a function
Trying to use ESM import (e.g., import liveServer from 'alive-server') which returns undefined.
fixUse const liveServer = require('alive-server'); /* then liveServer.start(params) */ alive-server: command not found
alive-server is not installed globally or not in PATH.
fixRun 'npm install -g alive-server' and ensure npm global bin directory is in PATH.
port is already in use
The specified port is occupied by another process.
fixUse --port to specify a different port, or kill the process using the current port.
Audit
Dependencies
sendrequiredUsed to serve static files (required at runtime)