{"id":19374,"library":"babel-watch","title":"babel-watch","description":"A fast file watcher and restarter for babel-node apps. Instead of restarting babel-node on each change (which is slow), it runs babel transpilation once in a master process and spawns a plain node child with the transpiled code. Current stable version is 7.8.1, with a maintenance release cadence. Key differentiators: autowatch (automatically watches files as they are required), faster restarts than nodemon+babel-node, and supports Babel 7.","status":"active","version":"7.8.1","language":"javascript","source_language":"en","source_url":"https://github.com/kmagiera/babel-watch","tags":["javascript","babel","nodemon","babel-node","watch"],"install":[{"cmd":"npm install babel-watch","lang":"bash","label":"npm"},{"cmd":"yarn add babel-watch","lang":"bash","label":"yarn"},{"cmd":"pnpm add babel-watch","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency; babel-watch requires @babel/core to be installed separately in the project to perform transpilation.","package":"@babel/core","optional":true}],"imports":[],"quickstart":{"code":"{\n  \"scripts\": {\n    \"start\": \"babel-watch src/main.js\"\n  }\n}\n\n# Then run:\nnpm start","lang":"javascript","description":"Installs babel-watch as a dev dependency and creates an npm script to run it with a source file."},"warnings":[{"fix":"Update Node to >=8 and install @babel/core@^7.","message":"babel-watch v7 requires Node >= 8 and @babel/core ^7.0.0. It will not work with older Node versions or Babel 6.","severity":"breaking","affected_versions":">=7.0.0"},{"fix":"Use --ignore 'node_modules' along with other patterns, e.g., --ignore 'node_modules,dist'.","message":"When using --ignore, node_modules are ignored by default. If you specify a custom --ignore, you must include node_modules explicitly if you still want to ignore it.","severity":"gotcha","affected_versions":">=7.0.0"},{"fix":"Use --inspect 0.0.0.0:9229 instead of --inspect=0.0.0.0:9229.","message":"The --inspect option's address must be specified as a separate argument when using = syntax may cause issues.","severity":"gotcha","affected_versions":">=7.0.0"},{"fix":"Replace -d with --inspect and -B with --inspect-brk.","message":"The -d and -B debug options are deprecated; use --inspect or --inspect-brk instead.","severity":"deprecated","affected_versions":">=7.0.0"},{"fix":"Pass -x node_modules to exclude node_modules from autowatch.","message":"Autowatch may ignore files in node_modules by default but may still watch them if they are required. Use -x to exclude additional directories.","severity":"gotcha","affected_versions":">=7.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Update babel-watch to v7.5.0 or later: npm install babel-watch@latest","cause":"Using --config-file with babel-watch versions older than 7.5.0 which do not support that option.","error":"babel-watch: error: unknown option `--config-file'"},{"fix":"Install @babel/core: npm install --save-dev @babel/core","cause":"@babel/core is a peer dependency of babel-watch and must be installed separately.","error":"Error: Cannot find module '@babel/core'"},{"fix":"Increase Node memory limit with --max_old_space_size, or exclude unnecessary directories with --ignore.","cause":"The process ran out of memory due to large files or circular requires causing infinite loops.","error":"babel-watch: FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory"},{"fix":"Use --inspect or --inspect-brk instead.","cause":"Using deprecated debug options (-d or -B).","error":"(node:12345) [DEP0005] DeprecationWarning: ..."},{"fix":"Specify a different port with --inspect 0.0.0.0:9230","cause":"Another process is already using the inspector port when using --inspect without a custom port.","error":"Error: listen EADDRINUSE :::9229"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}