Registry / devops / less-bundle

less-bundle

JSON →
library0.1.2jsnpmunverified

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.

npm install less-bundle
INSTALL
IMPORT
SIG · LESS-BUNDLE
L
less-bundle
devopsjavascriptv0.1.2
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

bundle
const bundle = require('less-bundle');
import bundle from 'less-bundle';
This package is CommonJS-only. Attempting to use `import` syntax will result in a runtime error in most Node.js environments.

Demonstrates how to use `less-bundle` to combine multiple LESS files into a single CSS output, including handling imports and error logging.

const bundle = require('less-bundle'); const path = require('path'); const fs = require('fs'); const srcFilePath = path.join(__dirname, 'main.less'); const destFilePath = path.join(__dirname, 'out.less'); // Create a dummy main.less for demonstration const dummyLessContent = ` @color: #333; .header { color: @color; .logo { font-size: 2em; } } @import "_variables.less"; `; const dummyVariablesContent = ` @secondaryColor: blue; .footer { color: @secondaryColor; } `; fs.writeFileSync(srcFilePath, dummyLessContent); fs.writeFileSync(path.join(__dirname, '_variables.less'), dummyVariablesContent); bundle({ src: srcFilePath, dest: destFilePath, // Optional: add a dummy version and license if desired for output version: '0.1.2', license: path.join(__dirname, 'LICENSE') // Assuming a LICENSE file exists or is created }, function (err) { if (err) { console.error('Error bundling LESS:', err); } else { console.log('LESS files bundled successfully to', destFilePath); // Clean up dummy files fs.unlinkSync(srcFilePath); fs.unlinkSync(path.join(__dirname, '_variables.less')); fs.unlinkSync(destFilePath); } });
Debug
Known issues
breakingThe `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.
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.
affects: >=0.1.2
gotchaThis package is CommonJS-only. Using `import bundle from 'less-bundle';` in an ES module context will result in a runtime error.
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.
affects: >=0.1.2
gotchaThe 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.
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`.
affects: >=0.1.2
Errors
Common errors & fixes
TypeError: require is not a function
Attempting to use `less-bundle` in an ECMAScript Module (ESM) context, where `require` is not globally available.
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.
Error: Cannot find module 'less-bundle'
The package either was not installed correctly, or Node.js's module resolution failed, possibly due to path issues or corruption in `node_modules`.
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`.
less-bundle process exited with code 1 (or similar compilation error)
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.
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.
Upgrade
Version history
0.1.2latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
less-bundle — npm install less-bundle · libregistry