Registry / serialization / sass-include-paths

sass-include-paths

JSON →
library4.10.0jsnpmunverified

Generates include path arrays for node-sass from npm, bower, Ruby gem, and Bundler sources. Version 4.10.0 (stable, no recent updates). Enables interoperability between Ruby Sass, LibSass, and Eyeglass by scanning node_modules, bower_components, and gem directories for SCSS/SASS packages. Differentiator: provides both async (Promise-based) and sync variants for tools like Gulp. Note: Ruby gem scanning requires a Ruby environment; bower support is legacy.

npm install sass-include-paths
INSTALL
IMPORT
SIG · SASS-INCLUDE-PATHS
S
sass-include-paths
serializationjavascriptv4.10.0
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.

nodeModulesSync
import { nodeModulesSync } from 'sass-include-paths'
const nodeModulesSync = require('sass-include-paths').nodeModulesSync
ESM default export is an object with methods; named imports work. CJS require works for sync methods.
nodeModules
import { nodeModules } from 'sass-include-paths'
const nodeModules = require('sass-include-paths').nodeModules
Async method returns a Promise. In ESM, await or use .then().
rubyGemsBundle
import { rubyGemsBundle } from 'sass-include-paths'
import rubyGemsBundle from 'sass-include-paths'
Default export is an object; do not import as default.
bowerComponentsSync
import { bowerComponentsSync } from 'sass-include-paths'
const bowerComponentsSync = require('sass-include-paths/bowerComponentsSync')
All methods are on the default export object, not separate files.

Shows how to synchronously generate include paths from npm and Ruby gems, then use them with node-sass.

import { nodeModulesSync, rubyGemsSync } from 'sass-include-paths'; const includePaths = [] .concat(nodeModulesSync()) .concat(rubyGemsSync()); console.log('Include paths:', includePaths); // Usage with node-sass: // const sass = require('node-sass'); // const result = sass.renderSync({ // file: 'main.scss', // includePaths: includePaths // }); // console.log(result.css.toString());
Debug
Known issues
gotchabower support is legacy and may be removed in future versions.
fix
Avoid relying on bowerComponents or bowerComponentsSync if possible.
affects: >=4.0.0
gotchaRuby gem scanning requires a working Ruby environment and may fail silently if gems are not activated.
fix
Ensure Ruby and gems are installed and PATH is set correctly.
affects: >=4.0.0
gotchaAsync methods return Promises and must be awaited or chained; calling them synchronously will not return the array.
fix
Use the Sync variant or await the async method.
affects: >=4.0.0
gotchaThe module does not support custom package managers or scoped npm packages automatically.
fix
Manually add paths for scoped packages or other package managers.
affects: >=4.0.0
Errors
Common errors & fixes
Cannot find module 'sass-include-paths'
Package not installed or import path incorrect.
fix
Run npm install sass-include-paths --save-dev and use correct import (see imports section).
TypeError: nodeModulesSync is not a function
Using default import incorrectly or destructuring from wrong object.
fix
Use import { nodeModulesSync } from 'sass-include-paths'
Error: ENOENT: no such file or directory, scandir '/path/to/gems'
Ruby gem bundle path does not exist or is misconfigured.
fix
Verify the bundle path (default ./vendor/bundle) or customize via options.
Upgrade
Version history
4.10.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
sass-include-paths — npm install sass-include-paths · libregistry