Registry / web-framework / nva-server

nva-server

JSON →
library0.7.2jsnpmunverified

nva-server is a frontend project development server that serves static content with features like asset serving, mock API configs, CORS support, and URL rewrites. It offers a command-line interface with options for port, host, content path, asset path, mock file, browser opening, and logging. Designed for development workflows, it integrates with the nva ecosystem. The package appears to have low maintenance based on sporadic releases, with the latest versions indicating ongoing but infrequent updates. It serves as an alternative to tools like http-server or serve with additional development-specific features.

npm install nva-server
INSTALL
IMPORT
SIG · NVA-SERVER
N
nva-server
web-frameworkjavascriptv0.7.2
Install
—
Import
—
Disk
—
Pass rate
0/ 6
Env Coverage0 / 6
glibc
18–22
musl
18–22
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
musl
node 18–223 runs
build_error
glibc
node 18–223 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
✓ import nvaServer from 'nva-server'
✗ const nvaServer = require('nva-server')
The package is ESM-only since v1.0.0. Use import syntax.
run
✓ import { run } from 'nva-server'
✗ const run = require('nva-server').run
Named export for programmatic usage. Check documentation for exact API.
Server
✓ import { Server } from 'nva-server'
✗ const Server = require('nva-server').Server
If Server class is exported, use named import. See changelog for v0.x vs v1.x.

Install the package, set environment variable for port, then run the CLI to serve ./public with CORS and logging enabled.

npm install nva-server --save export PORT=5000 nva-server -p $PORT -c ./public --cors --log
nva-server --version
Debug
Known issues
breakingv1.0.59 introduced ESM-only support, breaking CJS require() usage.
fix
Use import syntax or upgrade to supported versions.
affects: >=1.0.59
deprecatedThe --config option may be deprecated in favor of nva-server.config.js file.
fix
Refer to latest docs for configuration file approach.
affects: >=0.3.43
gotchaCLI options changed between versions: -p vs --port etc. Use long options for compatibility.
fix
Use full option names like --port, --content to ensure compatibility across versions.
affects: >=0.1.39
gotchaMock API feature requires proper file path; relative paths are resolved from current working directory.
fix
Provide absolute path or ensure relative path is correct from CWD.
affects: >=0.1.38
Errors
Common errors & fixes
Error: Cannot find module 'nva-server'
Package not installed or name typo.
fix
Run 'npm install nva-server --save' (note hyphen, not underscore).
SyntaxError: Cannot use import statement outside a module
Using ESM import syntax without 'type':'module' in package.json or .mjs extension.
fix
Add 'type':'module' to package.json, or use require if version <1.0.59.
nva-server: command not found
Not installed globally or not in PATH.
fix
Install globally: npm install -g nva-server, or use npx nva-server.
Missing option: -p
CLI parser expecting long options in newer version; -p may be removed.
fix
Use --port instead of -p.
Upgrade
Version history
0.7.2latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
nva-server — npm install nva-server · libregistry