{"id":13432,"library":"less-bundle","title":"Less Bundle","description":"Less Bundle is a package designed to concatenate multiple LESS files into a single output file, primarily intended for simplifying stylesheet management in larger projects with component-specific LESS files. The version documented here, 0.1.2, is an early release of the package. This specific iteration appears to be abandoned, with no significant updates or active development for many years, as indicated by its `engines.node` requirement of `>=0.10.0` and the existence of more recent, albeit also inactive, forks (e.g., `less-bundle-promise` last published 4 years ago). While its core functionality is straightforward bundling, it lacks the advanced features, modern tooling integration, or active maintenance found in contemporary CSS preprocessor workflows or general-purpose module bundlers. Users should consider current stable alternatives for production use. It does not follow a discernible release cadence given its inactive status.","status":"abandoned","version":"0.1.2","language":"javascript","source_language":"en","source_url":"git://github.com/Platypi/less-bundle","tags":["javascript"],"install":[{"cmd":"npm install less-bundle","lang":"bash","label":"npm"},{"cmd":"yarn add less-bundle","lang":"bash","label":"yarn"},{"cmd":"pnpm add less-bundle","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"This package is CommonJS-only. Attempting to use `import` syntax will result in a runtime error in most Node.js environments.","wrong":"import bundle from 'less-bundle';","symbol":"bundle","correct":"const bundle = require('less-bundle');"}],"quickstart":{"code":"const bundle = require('less-bundle');\nconst path = require('path');\nconst fs = require('fs');\n\nconst srcFilePath = path.join(__dirname, 'main.less');\nconst destFilePath = path.join(__dirname, 'out.less');\n\n// Create a dummy main.less for demonstration\nconst dummyLessContent = `\n@color: #333;\n.header {\n  color: @color;\n  .logo { font-size: 2em; }\n}\n@import \"_variables.less\";\n`;\nconst dummyVariablesContent = `\n@secondaryColor: blue;\n.footer { color: @secondaryColor; }\n`;\n\nfs.writeFileSync(srcFilePath, dummyLessContent);\nfs.writeFileSync(path.join(__dirname, '_variables.less'), dummyVariablesContent);\n\nbundle({\n    src: srcFilePath,\n    dest: destFilePath,\n    // Optional: add a dummy version and license if desired for output\n    version: '0.1.2',\n    license: path.join(__dirname, 'LICENSE') // Assuming a LICENSE file exists or is created\n}, function (err) {\n  if (err) {\n    console.error('Error bundling LESS:', err);\n  } else {\n    console.log('LESS files bundled successfully to', destFilePath);\n    // Clean up dummy files\n    fs.unlinkSync(srcFilePath);\n    fs.unlinkSync(path.join(__dirname, '_variables.less'));\n    fs.unlinkSync(destFilePath);\n  }\n});","lang":"javascript","description":"Demonstrates how to use `less-bundle` to combine multiple LESS files into a single CSS output, including handling imports and error logging."},"warnings":[{"fix":"Migrate to a modern build tool or task runner (e.g., Gulp, Webpack, Vite, Parcel) with `less` integration. For simple concatenation, Node.js `fs` module operations can suffice. The core `less` package itself is actively maintained.","message":"The `less-bundle` package (version 0.1.2) is abandoned and not actively maintained. It targets very old Node.js versions (>=0.10.0), making it incompatible with modern Node.js runtimes and potentially insecure due to unpatched vulnerabilities.","severity":"breaking","affected_versions":">=0.1.2"},{"fix":"Ensure your project is configured for CommonJS modules if you absolutely must use this package, or use `const bundle = require('less-bundle');` in a compatible environment.","message":"This package is CommonJS-only. Using `import bundle from 'less-bundle';` in an ES module context will result in a runtime error.","severity":"gotcha","affected_versions":">=0.1.2"},{"fix":"Consider manually compiling LESS files using the latest `less` npm package (e.g., `npm install less`) and then concatenating the resulting CSS, or using a modern bundler that integrates with `less`.","message":"The package likely depends on an outdated version of the `less` compiler, which could lead to syntax errors with modern LESS features or unexpected compilation behavior.","severity":"gotcha","affected_versions":">=0.1.2"}],"env_vars":null,"last_verified":"2026-04-19T00:00:00.000Z","next_check":"2026-07-18T00:00:00.000Z","problems":[{"fix":"Ensure your environment supports CommonJS or convert your code to use `const bundle = require('less-bundle');` within a CommonJS module. For modern projects, it's recommended to use an up-to-date bundling solution.","cause":"Attempting to use `less-bundle` in an ECMAScript Module (ESM) context, where `require` is not globally available.","error":"TypeError: require is not a function"},{"fix":"Run `npm install less-bundle` to ensure the package is installed. If the problem persists, try deleting `node_modules` and `package-lock.json` and reinstalling with `npm install`.","cause":"The package either was not installed correctly, or Node.js's module resolution failed, possibly due to path issues or corruption in `node_modules`.","error":"Error: Cannot find module 'less-bundle'"},{"fix":"Check your LESS files for syntax errors. Given the age of `less-bundle`, consider directly using the `less` CLI or API for compilation with a modern `less` package version to isolate and debug compilation issues.","cause":"The underlying `less` compiler or its configuration encountered an error, possibly due to invalid LESS syntax, missing imports, or an incompatible version of the `less` compiler being used internally.","error":"less-bundle process exited with code 1 (or similar compilation error)"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null}