rc-server
raw JSON → 3.3.5 verified Sat May 09 auth: no javascript deprecated
Deprecated development server for react-component projects. Version 3.3.5 is the last release. It provided JSX support, autoprefixing, test runner integration (mocha-phantomjs), and CommonJS bundling for the browser. Replaced by rc-tools (specifically `rc-tools run server`). No longer maintained; users should migrate to rc-tools or modern alternatives like webpack-dev-server or Vite, which offer far better performance, HMR, and broader ecosystem support.
Common errors
error Error: Cannot find module 'rc-server' ↓
cause Missing local installation or global install without proper NODE_PATH.
fix
Run
npm install rc-server --save-dev in your project directory, then use the command via npx or the node_modules/.bin path. error bash: rc-server: command not found ↓
cause Not installed globally and not using npx.
fix
Use
npx rc-server or run from project root with node ./node_modules/.bin/rc-server. error SyntaxError: Unexpected token < ↓
cause JSX is not transpiled; the project may not have the @jsx pragma or Babel is missing.
fix
Add
/** @jsx React.DOM */ at the top of every JSX file, or use a modern transpiler like Babel with the appropriate React preset. Warnings
deprecated This project is deprecated. Use rc-tools run server instead. ↓
fix Migrate to rc-tools: install rc-tools, replace 'rc-server' with 'rc-tools run server' in scripts.
breaking Requires Node >=0.11 and --harmony flag; incompatible with modern Node versions (>=12) without additional transpilation. ↓
fix Upgrade to a modern server like webpack-dev-server or Vite that supports current Node.js LTS.
gotcha Uses old JSX transform (@jsx React.DOM) incompatible with React 17+ and modern Babel presets. ↓
fix Update source files to use modern JSX transform (React 17+'s automatic runtime) and a current build tool.
Install
npm install rc-server yarn add rc-server pnpm add rc-server Imports
- rc-server CLI wrong
rc-server (without npx or the full path, may not be found in PATH)correctnpx rc-server or node --harmony node_modules/.bin/rc-server
Quickstart
// Create a basic rc-server project structure:
// index.js
/** @jsx React.DOM */
var Component = require('./lib/Component');
module.exports = <Component />;
// lib/Component.js
/** @jsx React.DOM */
var React = require('react');
var Component = React.createClass({
render: function(){
return <div>Hello from rc-server</div>;
}
});
module.exports = Component;
// package.json (partial)
{
"devDependencies": {
"rc-server": "^3.0.0"
},
"scripts": {
"start": "node --harmony node_modules/.bin/rc-server"
},
"config": {
"port": 8001
}
}
// Install and run:
// npm install
// npm start