FIS3 Node.js Server
fis3-server-node is a Node.js-based server designed as the default local development server for the `fis3` front-end build system. It leverages the Express.js framework to serve static assets and handle development-time requests generated by `fis3`'s build and release processes. The package is currently at version `0.1.3`. Its core dependency, `fis3`, which is a comprehensive front-end engineering build system focused on performance optimization, resource loading, and modular development, last saw a beta release (v3.5.0-beta.3) approximately three years ago. The GitHub repository for `fis3-server-node` shows no activity since approximately five years ago, and the main `fis3` repository is similarly inactive since late 2017. This profound lack of recent development across the entire `fis3` ecosystem indicates that both `fis3` and `fis3-server-node` are effectively abandoned and are not receiving active maintenance, feature updates, or critical security patches. Its primary use case was to provide a quick, integrated server environment for `fis3` projects to preview compiled code, rather than being a general-purpose production server solution. Developers seeking modern alternatives should consider contemporary build tools and local development servers.
Common errors
-
Error: Cannot find module 'fis3-server-node'
cause The package is not installed as a dependency of `fis3`, or the Node.js environment cannot resolve the module path due to environmental issues or an outdated Node.js version conflicting with global installations.fixEnsure `fis3` is installed globally (`npm install -g fis3`), which should bring in its necessary dependencies including this server module. If using a modern Node.js version, consider downgrading to an older, compatible Node.js version (e.g., Node.js 8 or 10) or, preferably, migrating away from this deprecated toolchain. -
ERR_REQUIRE_ESM is not defined in ES module scope
cause Attempted to import `fis3-server-node` using ES module syntax (`import fis3ServerApp from 'fis3-server-node';`) within an ES module context.fixThis package is a CommonJS module. Use `const fis3ServerApp = require('fis3-server-node');` for any programmatic interactions. For standard `fis3` CLI usage, no direct import is typically needed within your project code. -
TypeError: Cannot read properties of undefined (reading 'project')
cause Attempted to run `fis3-server-node` directly or within a Node.js environment where the global `fis` object (expected to be provided by the `fis3` CLI) is not defined, which the server relies on for configuration (e.g., project root).fixAlways start the server through the `fis3` command-line tool as intended: `fis3 server start --type node`. This ensures the necessary `fis3` execution context and global objects are present.
Warnings
- breaking This package is effectively abandoned. It has not received updates in approximately five years, and the entire `fis3` ecosystem it belongs to is also unmaintained. This means it is highly likely to be incompatible with modern Node.js versions (e.g., Node.js 16+ or later).
- security Due to its abandoned status, `fis3-server-node` and its underlying `express` dependency (which will also be an old version) are highly likely to contain unpatched security vulnerabilities. Using this package in any environment, especially for public-facing development or CI/CD, poses significant security risks.
- gotcha This package is a CommonJS module and explicitly does not support ES Modules (`import`/`export`). Attempting to import it using ES module syntax will result in a runtime error.
- gotcha The package internally relies on the global `fis` object (e.g., `fis.project.get=root()`), meaning it's tightly coupled to the `fis3` CLI's execution environment. Running it programmatically outside the `fis3` context without manually defining or mocking `fis` will likely cause runtime errors.
Install
-
npm install fis3-server-node -
yarn add fis3-server-node -
pnpm add fis3-server-node
Imports
- fis3ServerApp
import fis3ServerApp from 'fis3-server-node';
const fis3ServerApp = require('fis3-server-node');
Quickstart
```bash
# 1. Install fis3 globally (if not already installed)
npm install -g fis3
# 2. Create a new project directory and initialize fis3
mkdir my-fis-project
cd my-fis-project
fis3 init --force # Use --force if the directory is not empty
# 3. Create a simple HTML file for the project root
echo '<!DOCTYPE html><html><head><title>FIS3 Project</title></head><body><h1>Hello from FIS3 Server!</h1></body></html>' > index.html
# 4. Create a fis-conf.js file with minimal configuration
echo "// fis-conf.js\nfis.match('*.html', { release: '/$0' });" > fis-conf.js
# 5. Start the fis3 server using the 'node' type (which implicitly uses fis3-server-node)
fis3 server start --type node
# The server will typically start on http://127.0.0.1:8080 (or another available port).
# Open your browser to the indicated URL to view the 'index.html'.
# Press Ctrl+C in the terminal to stop the server.
```