{"id":25092,"library":"coffee-react","title":"Coffee-React","description":"Deprecated tool that provided JSX-like syntax for building React components with CoffeeScript, using the CJSX format. The 5.0.1 stable release is the last; the project has been abandoned. It wraps coffee-react-transform and coffee-script to compile CJSX to JavaScript, and includes a cjsx executable that functions as a coffee replacement. Key differentiator: allowed React JSX syntax within CoffeeScript files. Now superseded by cjsx-codemod for migration. No longer maintained or recommended for new projects.","status":"deprecated","version":"5.0.1","language":"javascript","source_language":"en","source_url":"git://github.com/jsdf/coffee-react","tags":["javascript","coffeescript","react","jsx","cjsx","coffee-react"],"install":[{"cmd":"npm install coffee-react","lang":"bash","label":"npm"},{"cmd":"yarn add coffee-react","lang":"bash","label":"yarn"},{"cmd":"pnpm add coffee-react","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Required to compile CoffeeScript code.","package":"coffee-script","optional":false},{"reason":"Transforms CJSX syntax to JavaScript.","package":"coffee-react-transform","optional":false}],"imports":[],"quickstart":{"code":"npm install -g coffee-react@5.0.1\ncat <<EOF > component.cjsx\nMyComponent = React.createClass\n  render: ->\n    <div className=\"greeting\">\n      Hello, {if @props.name? then @props.name else 'World'}!\n    </div>\nEOF\ncjsx -c component.cjsx\ncat component.js\n","lang":"javascript","description":"Installs coffee-react globally, compiles a CJSX file to JavaScript using the cjsx command, then outputs the resulting JS."},"warnings":[{"fix":"Migrate codebase using cjsx-codemod (https://github.com/jsdf/cjsx-codemod) and consider moving to modern alternatives like Babel with JSX.","message":"This package is no longer maintained and marked as deprecated. Use cjsx-codemod to transition away.","severity":"deprecated","affected_versions":">=0.0.0"},{"fix":"Avoid writing new CJSX code; use standard JSX with JavaScript or TypeScript instead.","message":"Insurmountable limitations exist in the parser; complex CJSX syntax may produce bugs.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Pin React to 0.13.x - 0.15.x, or move away from coffee-react.","message":"Version 5.x only supports React 0.13.x - 0.15.x. Using with newer React versions will cause issues.","severity":"breaking","affected_versions":"5.0.0 - 5.0.1"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Ensure both coffee-react and coffee-react-transform are installed: npm install coffee-react coffee-react-transform","cause":"Missing required dependency when using coffee-react directly via require().","error":"Error: Cannot find module 'coffee-react-transform'"},{"fix":"Install globally: npm install -g coffee-react@5.0.1, or use npx coffee-react","cause":"Package not installed globally or not in PATH.","error":"cjsx: command not found"},{"fix":"Review CJSX syntax rules; ensure elements are properly closed and attributes use CoffeeScript expressions.","cause":"CJSX syntax not correctly formatted or using incompatible JSX-like syntax.","error":"Parse error on line ... Unexpected token '<'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}