{"id":26147,"library":"react-compiler-check","title":"React Compiler Check","description":"A CLI tool that scans React projects for code patterns incompatible with React Compiler. Version 0.1.11, pre-1.0 with monthly releases. Detects legacy patterns (string refs, Legacy Context), impure renders (setTimeout, fetch in render), improper hook usage (hooks in loops/conditions), direct state mutations, and dynamic objects. Provides actionable suggestions. Lightweight, zero-config, integrates with ESLint via optional plugin. Unlike React Compiler's built-in checks, this is a standalone diagnostics tool for existing codebases.","status":"active","version":"0.1.11","language":"javascript","source_language":"en","source_url":"https://github.com/hmadhsan/react-compiler-check","tags":["javascript","react","react-compiler","diagnostics","eslint"],"install":[{"cmd":"npm install react-compiler-check","lang":"bash","label":"npm"},{"cmd":"yarn add react-compiler-check","lang":"bash","label":"yarn"},{"cmd":"pnpm add react-compiler-check","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Parses TypeScript files; not required for JavaScript-only projects","package":"typescript","optional":true}],"imports":[{"note":"CLI is the primary interface; no JS API exported yet.","wrong":"react-compiler-check","symbol":"default (CLI)","correct":"npx react-compiler-check ./src"},{"note":"Uncommon; the package is designed for CLI use, but can be required programmatically. No default export, use check.run().","wrong":"","symbol":"require (CJS)","correct":"const check = require('react-compiler-check')"},{"note":"Named export `run` is available for programmatic use. Default export does not exist.","wrong":"import reactCompilerCheck from 'react-compiler-check'","symbol":"ESM import","correct":"import { run } from 'react-compiler-check'"}],"quickstart":{"code":"npx react-compiler-check ./src","lang":"typescript","description":"Scans all .js/.jsx/.ts/.tsx files in ./src for React Compiler incompatibilities and displays actionable diagnostics."},"warnings":[{"fix":"Install typescript as a dev dependency: npm install --save-dev typescript","message":"Tool scans .ts and .tsx files but requires TypeScript installed separately if your project uses TypeScript.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Run tool on each package directory separately or use a glob pattern if supported (currently not).","message":"CLI may not detect issues in files outside the given directory; does not follow imports or resolve monorepos.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Cross-check with React Compiler's own validation. Contribute to the tool to refine rules.","message":"Tool reports false positives for patterns that React Compiler actually supports (e.g., certain useEffect dependencies). Always verify with the actual compiler.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Update scripts parsing CLI output or switch to programmatic API with run().","message":"Breaking changes in 0.2.0: output format changed from plain text to JSON; API renamed from analyze to run.","severity":"breaking","affected_versions":"<0.2.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Install locally: npm install react-compiler-check --save-dev. Or use npx: npx react-compiler-check","cause":"Package not installed globally or locally, or not in node_modules.","error":"Error: Cannot find module 'react-compiler-check'"},{"fix":"Use import { run } from 'react-compiler-check'","cause":"Using default import in ESM when only named export exists.","error":"TypeError: check.run is not a function"},{"fix":"Use require('react-compiler-check') or configure your bundler to handle ESM.","cause":"Running in a CJS environment without transpilation.","error":"SyntaxError: Unexpected token 'export'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}