{"id":18682,"library":"prcl","title":"Parcel (prcl)","description":"Parcel is an ultra-fast JavaScript bundler designed for development speed, v0.4.0, with no release cadence (sporadic). It avoids parsing JS fully, working mostly by concatenation with a few simple rules (no dynamic requires, no non-constant module names). Key differentiator: sub-10ms rebuilds, faster than Browserify or FuseBox by an order of magnitude, but lacks advanced features like tree-shaking. Ideal for rapid iteration during development, not production builds. ESM-only; CommonJS require() is used but only with static strings.","status":"active","version":"0.4.0","language":"javascript","source_language":"en","source_url":"https://github.com/nathan/parcel","tags":["javascript"],"install":[{"cmd":"npm install prcl","lang":"bash","label":"npm"},{"cmd":"yarn add prcl","lang":"bash","label":"yarn"},{"cmd":"pnpm add prcl","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"The npm package is 'prcl', not 'parcel'. The CLI command is 'prcl'.","wrong":"npx parcel index.js bundle.js","symbol":"default (CLI)","correct":"npx prcl index.js bundle.js"},{"note":"Parcel has no documented programmatic API; it's purely a CLI tool.","wrong":"import prcl from 'prcl'","symbol":"N/A (no programmatic API)","correct":"const prcl = require('prcl') // not exposed"},{"note":"Watch flag is '-w', not '--watch' (though both may work).","wrong":"prcl --watch index.js bundle.js","symbol":"CLI watch mode","correct":"prcl -w index.js bundle.js"}],"quickstart":{"code":"// math.js\nexports.square = x => x * x\n\n// index.js\nconst itt = require('itt')\nconst math = require('./math')\nconsole.log(itt.range(10).map(math.square).join(' '))\n\n// terminal\n// npm install -g prcl\n// prcl index.js >bundle.js\n// node bundle.js","lang":"javascript","description":"Basic usage: create two CommonJS modules, bundle with prcl via stdout redirection, run with Node."},"warnings":[{"fix":"Install with `npm install -g prcl` or `npx prcl`. Do not confuse with `parcel`.","message":"Package name is 'prcl' on npm, not 'parcel' (which is a different package).","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Consider modern alternatives like esbuild or Vite for fast bundling.","message":"This package is extremely outdated (last release 2017?) and no longer maintained. Use at your own risk.","severity":"deprecated","affected_versions":">=0.4.0"},{"fix":"Replace dynamic requires with static ones or use a different bundler.","message":"Dynamic require() expressions are not supported; only static string literals.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Rename any variable or property to avoid shadowing 'require'.","message":"Variable or property named 'require' is forbidden.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Use a production bundler like Webpack or Rollup for optimized output.","message":"No tree-shaking; bundles entire modules even if you only use a small part.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Add transforms manually (e.g., tsc --module commonjs) before bundling.","message":"No built-in support for TypeScript, JSX, or CSS imports.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Restart the process periodically or avoid long-running watch sessions.","message":"Watch mode (-w) may have file descriptor leaks on some systems.","severity":"gotcha","affected_versions":">=0.4.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Use as CLI only: `npx prcl index.js bundle.js`","cause":"Trying to import prcl programmatically, but it has no programmatic API.","error":"Error: Cannot find module 'prcl'"},{"fix":"Parcel outputs CommonJS; in browser, load with a script tag but ensure require is defined (e.g., bundle with a shim). Or use for Node only.","cause":"Running bundled output in the browser without a module system.","error":"Error: require is not defined"},{"fix":"Ensure all dependencies are installed and required with exact paths. For npm packages, use 'prcl' with explicit node_modules paths if needed.","cause":"Using a relative path require that doesn't resolve correctly; Parcel does not resolve Node modules from node_modules as robustly as other bundlers.","error":"TypeError: Cannot read properties of undefined (reading 'map')"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}