{"id":26563,"library":"uber-compiler","title":"uber-compiler","description":"Compiles client-side JS and CSS using Google Closure Compiler, Closure Templates, and LESS. Version 0.4.7 runs on Node.js >= 0.4.1. It watches files for changes, caches compiled output, and supports custom warnings/compile modes. Unlike standalone build tools, it integrates directly into a Node.js server and auto-recompiles on file changes. Maintenance appears stalled with no recent updates.","status":"maintenance","version":"0.4.7","language":"javascript","source_language":"en","source_url":"git://github.com/kennberg/node-uber-compiler","tags":["javascript","compile","compiler","compress","minify","google","closure","js"],"install":[{"cmd":"npm install uber-compiler","lang":"bash","label":"npm"},{"cmd":"yarn add uber-compiler","lang":"bash","label":"yarn"},{"cmd":"pnpm add uber-compiler","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Required for JS compilation via Google Closure Compiler.","package":"google-closure-compiler","optional":false}],"imports":[{"note":"The package exports a factory function directly; ESM import as default works, but CommonJS require also works.","wrong":"const uberCompiler = require('uber-compiler');","symbol":"default","correct":"import uberCompiler from 'uber-compiler';"},{"note":"The package exports a single function; named destructuring fails.","wrong":"const { uberCompiler } = require('uber-compiler');","symbol":"uberCompiler function","correct":"import uberCompiler from 'uber-compiler'; const compiler = uberCompiler(options);"},{"note":"Methods are available on the compiler instance, not exported directly from the package.","wrong":"import { getJsFilename } from 'uber-compiler';","symbol":"getJsFilename","correct":"import uberCompiler from 'uber-compiler'; const compiler = uberCompiler(options); const jsFile = compiler.getJsFilename();"}],"quickstart":{"code":"const path = require('path');\nconst uberCompiler = require('uber-compiler');\n\nconst rootPath = process.cwd();\nconst options = {\n  jsPaths: [\n    path.join(rootPath, 'public/js/lib/jquery-1.7.2.js'),\n    path.join(rootPath, 'public/js/lib/underscore.js'),\n    path.join(rootPath, 'public/js/lib/backbone.js'),\n    path.join(rootPath, 'public/js/init.js'),\n    path.join(rootPath, 'public/js/model/'),\n    path.join(rootPath, 'public/js/view/'),\n    path.join(rootPath, 'public/js/router/'),\n    path.join(rootPath, 'public/js/main.js')\n  ],\n  cssPaths: [ path.join(rootPath, 'public/css') ],\n  outputDir: path.join(rootPath, 'public/cached'),\n  debug: false\n};\nconst compiler = uberCompiler(options);\ncompiler.run();","lang":"javascript","description":"Creates an uber-compiler instance with JS and CSS paths, then compiles and watches for changes."},"warnings":[{"fix":"Use path.join with process.cwd() or __dirname to create absolute paths.","message":"The jsPaths and cssPaths arrays must contain absolute paths. Relative paths cause 'Path must be absolute' errors.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Install google-closure-compiler globally: npm i -g google-closure-compiler","message":"Dependency google-closure-compiler is a large binary and must be installed globally (npm i -g google-closure-compiler) before using uber-compiler.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Migrate to modern build tools such as webpack, gulp, or rollup.","message":"This package is no longer actively maintained. The last release was in 2012. Alternatives like webpack or gulp are recommended.","severity":"deprecated","affected_versions":">=0.0.0"},{"fix":"Use process.on('uncaughtException') or wrap run() in try/catch for error handling.","message":"The 'endCallback' option is called after compilation completes but is not passed any arguments, making error handling difficult.","severity":"gotcha","affected_versions":">=0.0.0"}],"env_vars":null,"search_vec":"'0.4.1':24 '0.4.7':20 'appear':57 'auto':51 'auto-recompil':50 'build':40 'cach':30 'chang':29,55 'client':6 'client-sid':5 'closur':13,15,69 'compil':3,4,14,31,64,65 'compress':66 'css':10 'custom':35 'direct':44 'file':27,54 'googl':12,68 'integr':43 'javascript':63 'js':8,70 'less':18 'mainten':56 'minifi':67 'mode':37 'node.js':23,47 'output':32 'recent':61 'recompil':52 'run':21 'server':48 'side':7 'stall':58 'standalon':39 'support':34 'templat':16 'tool':41 'uber':2 'uber-compil':1 'unlik':38 'updat':62 'use':11 'version':19 'warnings/compile':36 'watch':26","created_at":"2026-05-01T13:50:37.558194+00:00","updated_at":"2026-05-01T13:50:37.558194+00:00","problems":[{"fix":"Use absolute paths by prefixing with path.join(__dirname, ...) or path.resolve().","cause":"Providing relative paths in jsPaths or cssPaths.","error":"Error: Path must be absolute: relative/path/to/js"},{"fix":"Run: npm i -g google-closure-compiler","cause":"Missing google-closure-compiler dependency, which must be installed globally.","error":"Error: Cannot find module 'google-closure-compiler'"},{"fix":"Use import uberCompiler from 'uber-compiler'; instead, or rename file to .cjs.","cause":"Attempting to use CommonJS require in an ESM module file.","error":"ReferenceError: require is not defined"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/kennberg/node-uber-compiler","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/uber-compiler","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops","web-framework","http-networking"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-05-01","next_check":"2026-07-30","install_tag":null}}