{"id":20269,"library":"pob-babel","title":"Pob Babel","description":"Pob Babel is a build and watch tool using Babel and TypeScript, part of the Pob monorepo toolchain. The current stable version is 45.0.1, requiring Node.js >=22.18.0. It integrates Babel compilation with TypeScript type-checking, providing a streamlined development workflow for JavaScript and TypeScript projects. Key differentiators include automatic dependency handling, watch mode, and integration with other Pob tools like @pob/version and pob-dependencies.","status":"active","version":"45.0.1","language":"javascript","source_language":"en","source_url":"https://github.com/christophehurpeau/pob","tags":["javascript"],"install":[{"cmd":"npm install pob-babel","lang":"bash","label":"npm"},{"cmd":"yarn add pob-babel","lang":"bash","label":"yarn"},{"cmd":"pnpm add pob-babel","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"ESM-only package, default export","wrong":"const pobBabel = require('pob-babel')","symbol":"pob-babel","correct":"import pobBabel from 'pob-babel'"},{"note":"Named export for build function","wrong":"const build = require('pob-babel/build')","symbol":"build","correct":"import { build } from 'pob-babel'"},{"note":"Named export for watch function","wrong":"const watch = require('pob-babel').watch","symbol":"watch","correct":"import { watch } from 'pob-babel'"}],"quickstart":{"code":"import { build, watch } from 'pob-babel';\n\n// Build once\nawait build({\n  cwd: process.cwd(),\n  config: './babel.config.js',\n  typescript: true,\n  clean: true\n});\n\n// Watch mode\nconst watcher = watch({\n  cwd: process.cwd(),\n  config: './babel.config.js',\n  typescript: true\n});\nwatcher.on('change', (file) => console.log(`File changed: ${file}`));\nwatcher.start();","lang":"typescript","description":"Shows basic build and watch usage with TypeScript, Babel config, and cleaning."},"warnings":[{"fix":"Upgrade Node.js to version 22.18.0 or later","message":"Node.js >=22.18.0 required as of version 45.0.0","severity":"breaking","affected_versions":">=45.0.0"},{"fix":"Use import syntax or dynamic import()","message":"ESM-only: CommonJS require() not supported since v45","severity":"breaking","affected_versions":">=45.0.0"},{"fix":"Use watcher.on('change', cb) instead of passing callback to watch()","message":"The 'watch' callback API deprecated in favor of event emitter","severity":"deprecated","affected_versions":">=44.0.0 <45.0.0"},{"fix":"Place TypeScript options in tsconfig.json; Babel only handles transpilation","message":"TypeScript config must be in tsconfig.json, not in Babel config","severity":"gotcha","affected_versions":">=40.0.0"},{"fix":"Migrate to babel.config.js or babel.config.cjs","message":"Removed support for .babelrc; use babel.config.js instead","severity":"breaking","affected_versions":">=40.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Run 'npm install pob-babel' and use correct import: import pobBabel from 'pob-babel'","cause":"Package not installed or import path incorrect","error":"Error: Cannot find module 'pob-babel'"},{"fix":"Use named import: import { build } from 'pob-babel'","cause":"Using default import but trying to call build as a method","error":"TypeError: pobBabel.build is not a function"},{"fix":"Upgrade Node.js to version >=22.18.0","cause":"Node.js version too old","error":"Error: Requires Node.js 22.18.0 or higher"},{"fix":"Add 'type': 'module' to package.json or use .mjs extension","cause":"Using ESM import in a CommonJS project without proper configuration","error":"SyntaxError: Cannot use import statement outside a module"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}