{"id":20570,"library":"start-babel","title":"start-babel","description":"Babel task for the Start task runner. Current stable version is 3.0.0 (released 2017-01-07). It integrates Babel transpilation into Start pipelines, supporting SourceMaps and configurable Babel options. Key differentiator: it operates on `[{ path, data, map }]` streams, making it compatible with Start's file-based flow. For newer Node versions, Babel 7+, or non-Start setups, consider using core Babel APIs or other runners like Gulp or Webpack.","status":"maintenance","version":"3.0.0","language":"javascript","source_language":"en","source_url":"https://github.com/start-runner/babel","tags":["javascript","start","start-task","babel"],"install":[{"cmd":"npm install start-babel","lang":"bash","label":"npm"},{"cmd":"yarn add start-babel","lang":"bash","label":"yarn"},{"cmd":"pnpm add start-babel","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Start task runner is a peer dependency; start-babel requires it to run.","package":"start","optional":false}],"imports":[{"note":"ESM-only since v3.0.0; CommonJS require may fail depending on Node version and transpilation.","wrong":"const babel = require('start-babel')","symbol":"default","correct":"import babel from 'start-babel'"},{"note":"Default export only; named export does not exist.","wrong":"import { babel } from 'start-babel'","symbol":"babel","correct":"import babel from 'start-babel'"},{"note":"Namespace import requires calling .default; direct call without .default will fail.","wrong":"import * as startBabel from 'start-babel'; startBabel(options)","symbol":"babel","correct":"import * as startBabel from 'start-babel'; startBabel.default(options)"}],"quickstart":{"code":"import Start from 'start';\nimport reporter from 'start-pretty-reporter';\nimport files from 'start-files';\nimport clean from 'start-clean';\nimport read from 'start-read';\nimport babel from 'start-babel';\nimport write from 'start-write';\n\nconst start = Start(reporter());\n\nexport const build = () => start(\n  files('build/'),\n  clean(),\n  files('src/**/*.js'),\n  read(),\n  babel({ sourceMaps: true }),\n  write('build/')\n);","lang":"javascript","description":"Shows a basic build pipeline using start-babel: clean target, read source files, transpile with source maps, write output."},"warnings":[{"fix":"Ensure upstream tasks (e.g., start-read) provide objects with `path`, `data`, `map` properties.","message":"Input data format changed in v2.0.0: now expects `[{ path, data, map }]` instead of raw file buffers.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Use Node >= 4. If you need babel-runtime, add it as a direct dependency.","message":"Dropped Node < 4 in v3.0.0; also switched to `babel-preset-start` and removed `babel-runtime` dependency.","severity":"breaking","affected_versions":">=3.0.0"},{"fix":"Consider migrating to direct Babel usage or an actively maintained build tool.","message":"This package is not actively maintained; last release was 2017. Babel 7+ and new Start versions may cause incompatibility.","severity":"deprecated","affected_versions":">=3.0.0"},{"fix":"Use ES module import syntax, or use a bundler/transpiler that understands ESM.","message":"ESM-only since v3.0.0; CommonJS require may fail if not transpiled or if Node version lacks ESM support.","severity":"gotcha","affected_versions":">=3.0.0"},{"fix":"Pass `ast: true` in the options object to babel() if you require the AST.","message":"Default Babel options set `{ ast: false }`. If you need AST in output, you must explicitly override.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Install start: npm install --save-dev start","cause":"start (task runner) is required as a peer dependency and not installed.","error":"Error: Cannot find module 'start'"},{"fix":"Use `import babel from 'start-babel'` instead of `import { babel }`.","cause":"Using named import `import { babel }` instead of default import.","error":"TypeError: (0 , _startBabel.default) is not a function"},{"fix":"Use `import babel from 'start-babel'` or call `startBabel.default(options)`.","cause":"Namespace import used without calling `.default`.","error":"TypeError: startBabel is not a function"},{"fix":"Update all tasks to versions that emit the required object format, or patch the data.","cause":"Using an older task (e.g., start-read prior to v2) that emits raw buffers.","error":"Error: Input data must be an array of objects with { path, data, map }"},{"fix":"Install and configure Babel presets (e.g., babel-preset-env) in a .babelrc or babel.config.js.","cause":"Babel cannot parse the file; often due to missing Babel presets/plugins.","error":"Error: unknown: Unexpected token (1:0)"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}