{"id":11412,"library":"node-bourbon","title":"Node Bourbon","description":"Node Bourbon is a `node-sass` wrapper for the now-unmaintained Bourbon Sass library. It provided a convenient way for Node.js developers to integrate Bourbon's Sass mixins and functions into their projects using `node-sass` (which itself is a binding for LibSass). The package reached its last stable version, 4.2.8, in March 2016. Since then, both `node-bourbon` and the original Bourbon project by thoughtbot have been abandoned. The original Bourbon library recommends transitioning to native CSS. Consequently, `node-bourbon` is not compatible with modern Sass compilers like Dart Sass or recent versions of Node.js, making it unsuitable for new projects and difficult to maintain in existing ones.","status":"abandoned","version":"4.2.8","language":"javascript","source_language":"en","source_url":"git://github.com/lacroixdesign/node-bourbon","tags":["javascript","sass","css"],"install":[{"cmd":"npm install node-bourbon","lang":"bash","label":"npm"},{"cmd":"yarn add node-bourbon","lang":"bash","label":"yarn"},{"cmd":"pnpm add node-bourbon","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Core dependency for compiling Sass; this package wraps Bourbon for node-sass (LibSass).","package":"node-sass","optional":false}],"imports":[{"note":"This package is CommonJS-only and does not support ES modules.","wrong":"import bourbon from 'node-bourbon';","symbol":"bourbon","correct":"const bourbon = require('node-bourbon');"},{"note":"Accesses the array of Bourbon's Sass include paths directly.","wrong":"require('node-bourbon')","symbol":"bourbon.includePaths","correct":"require('node-bourbon').includePaths"},{"note":"The `with()` function must be called to return the augmented array of paths.","wrong":"require('node-bourbon').with","symbol":"bourbon.with()","correct":"require('node-bourbon').with('path/to/extra/scss')"}],"quickstart":{"code":"const gulp = require('gulp');\nconst sass = require('gulp-sass')(require('sass')); // Using 'sass' for modern compatibility, though node-bourbon expected node-sass\nconst path = require('path');\n\ngulp.task('sass-compile', function () {\n  return gulp.src('src/styles/*.scss')\n    .pipe(sass({\n      // The primary way to include Bourbon paths is via includePaths\n      includePaths: require('node-bourbon').includePaths\n      // Alternatively, to include additional directories alongside Bourbon's:\n      // includePaths: require('node-bourbon').with(path.join(__dirname, 'src/components'))\n    }).on('error', sass.logError))\n    .pipe(gulp.dest('dist/css'));\n});\n\n// To run this, ensure you have gulp, gulp-sass, sass (Dart Sass) and node-bourbon installed.\n// You'll also need a 'src/styles/main.scss' file, e.g.:\n//\n// /* src/styles/main.scss */\n// @import \"bourbon\";\n//\n// body {\n//   @include display(flex);\n//   background-color: #f0f0f0;\n// }\n//\n// Run with: `npx gulp sass-compile`","lang":"javascript","description":"Demonstrates basic integration of `node-bourbon` with a Gulp build process using `gulp-sass` for compiling Sass files, including Bourbon's mixins."},"warnings":[{"fix":"Migrate to native CSS, modern Sass (Dart Sass), or a currently maintained utility-first CSS framework. If Bourbon features are strictly needed, consider the official `bourbon` npm package (though that project is also unmaintained and recommends native CSS).","message":"The `node-bourbon` package is effectively abandoned, with its last release over 10 years ago. It is built to wrap an older, also unmaintained version of the Bourbon Sass library (v4.x). Modern Sass environments (Dart Sass) and newer Node.js versions are not officially supported.","severity":"breaking","affected_versions":">=4.2.8"},{"fix":"Replace `node-sass` with `sass` (Dart Sass) and refactor Sass code to remove `node-bourbon` dependencies.","message":"This package exclusively relies on `node-sass` (LibSass), which itself is deprecated and no longer actively developed. It will not work with the modern `sass` package (Dart Sass) without careful configuration or potential breakage.","severity":"breaking","affected_versions":">=4.2.8"},{"fix":"Ensure `node-bourbon` is at version `4.2.8` to mitigate known path issues, though this is a very old version. If issues persist, manually verify `bourbon.includePaths` output.","message":"Earlier versions and even 4.2.7/4.2.8 had issues with returning incorrect or nested Bourbon paths, potentially leading to 'file not found' errors during Sass compilation.","severity":"gotcha","affected_versions":"<=4.2.7"},{"fix":"Always use `node-bourbon` with `node-sass` or `gulp-sass` (LibSass-based compilers) as recommended. Avoid `grunt-contrib-sass` when using this package.","message":"`node-bourbon` is explicitly NOT tested against the Ruby version of Sass. Using it with `grunt-contrib-sass` (which typically invokes Ruby Sass) may lead to unexpected behavior or compilation failures.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-04-19T00:00:00.000Z","next_check":"2026-07-18T00:00:00.000Z","problems":[{"fix":"Ensure `require('node-bourbon').includePaths` (or `.with()`) is correctly assigned to your Sass compiler's `includePaths` option in your build configuration (e.g., Gulp, Grunt, Webpack). Verify `node_modules/node-bourbon` exists and contains the expected files.","cause":"The Sass compiler (node-sass) could not locate Bourbon's stylesheet files. This often happens if `node-bourbon`'s `includePaths` are not correctly passed to the Sass compiler's options, or if `node-bourbon` itself is not installed correctly.","error":"Error: File to import not found or unreadable: bourbon"},{"fix":"Review your `gulp.src()`, `grunt.initConfig().files`, or Webpack loader configurations to ensure only actual `.scss` or `.sass` files are processed by the Sass compiler. Exclude `node_modules` directories explicitly if necessary.","cause":"This error occurs when a JavaScript file is mistakenly treated as a Sass file by the compiler. It typically happens if your build tool's glob pattern for Sass files accidentally includes `node-bourbon`'s `index.js` or another JavaScript file.","error":"Invalid CSS after \"v\": expected 1 selector or at-rule, was \"var path = require(\""},{"fix":"Update your Sass code to use the recommended alternatives for the deprecated Bourbon features. Given that Bourbon itself is unmaintained, this might involve migrating away from Bourbon entirely to native CSS or more modern Sass practices.","cause":"You are using a deprecated Bourbon mixin or function from an older version of Bourbon that `node-bourbon` wraps (Bourbon v4.x). These deprecation warnings were present in the original Bourbon library.","error":"WARNING: [Bourbon] [Deprecation] *** is deprecated and will be removed in 5.0.0."}],"ecosystem":"npm"}