{"id":18781,"library":"serve-build","title":"serve-build","description":"A minimal static file server for serving a build directory (e.g., after a build step) on a local port. Version 0.1.0 is the only release. No active maintenance or updates. Differentiators: zero-config, single command, no dependencies listed. It simply serves the `build/` folder on port 3000. No support for HTTPS, caching, or custom routes. Alternative to `http-server` or `serve` packages with fewer features.","status":"active","version":"0.1.0","language":"javascript","source_language":"en","source_url":null,"tags":["javascript"],"install":[{"cmd":"npm install serve-build","lang":"bash","label":"npm"},{"cmd":"yarn add serve-build","lang":"bash","label":"yarn"},{"cmd":"pnpm add serve-build","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"ESM-only package; requires Node >= 12 or transpilation","wrong":"const serveBuild = require('serve-build')","symbol":"serveBuild","correct":"import serveBuild from 'serve-build'"}],"quickstart":{"code":"// Install: npm install serve-build\n// Add script to package.json: \"start\": \"serve-build\"\n// Run: npm start\n// Or directly in terminal:\nnpx serve-build\n// Server starts on port 3000 and serves ./build directory","lang":"javascript","description":"Shows installation, script setup, and running serve-build to serve the build folder."},"warnings":[{"fix":"Ensure your build output is in ./build, or use a more flexible static server like 'serve' or 'http-server'.","message":"Only serves files from the 'build/' subdirectory; not configurable.","severity":"gotcha","affected_versions":"0.1.0"},{"fix":"If port 3000 is in use, kill the process or use a different tool.","message":"Port is hardcoded to 3000; cannot change via environment variables or CLI flags.","severity":"gotcha","affected_versions":"0.1.0"},{"fix":"Use a reverse proxy like nginx or a different server for HTTPS.","message":"No HTTPS support; HTTP only.","severity":"gotcha","affected_versions":"0.1.0"},{"fix":"Use 'latest' Node or convert project to ESM.","message":"ESM-only package; requires Node.js version >= 12 or a bundler/transpiler.","severity":"gotcha","affected_versions":"0.1.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Run 'npm install serve-build --save-dev' or 'yarn add serve-build'","cause":"Package not installed or global install missing.","error":"Error: Cannot find module 'serve-build'"},{"fix":"Use 'import serveBuild from 'serve-build'' or switch project to ESM.","cause":"Trying to require() an ESM-only package.","error":"ERR_REQUIRE_ESM"},{"fix":"Kill the process using port 3000 (e.g., 'lsof -ti:3000 | xargs kill') or use a different tool.","cause":"Port 3000 is busy by another process.","error":"EADDRINUSE: address already in use :::3000"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}