If you are looking for a handy answer in 2017 and are using Webpack, this was the easiest I found.

Suppose your module path is like:

node_modules/some-module/sass/app

Then in your main scss file you can use:

@import "~some-module/sass/app";

Tilde operator shall resolve any import as a module.

Answer from ProllyGeek on Stack Overflow
Discussions

How to reference a scss files installed to node_modules?
I am trying to import a scss file from node_modules. This to be exact: https://github.com/material-components/material-components-web-react/tree/master/packages/button I tried @import '@materia... More on github.com
🌐 github.com
20
July 26, 2018
Sass @use (NOT @import) with node_modules paths
Commenting for exposure. This issue is killing me as well, it seems like @use standards just aren't implemented in the css-loader/scss-loader stack. Which I don't fully understand in the first place, so any help is appreciated. More on reddit.com
🌐 r/webdev
9
3
January 27, 2020
node.js - Compile SASS and @import from node_modules - Stack Overflow
I'try to compile sass to css and importing a css-file from node_modules/purecss/build/pure.css therefore my sass file look like: More on stackoverflow.com
🌐 stackoverflow.com
gulp - Importing SASS partials from node_modules - Stack Overflow
Trying to build custom workflow with gulp, panini, mustache, sass and one of my problem is including partials from node_modules, here is example from main.scss file: @import "node_modules/bootstra... More on stackoverflow.com
🌐 stackoverflow.com
🌐
Sass
sass-lang.com › documentation › at-rules › import
Sass: @import
All Sass implementations allow users to provide load paths: paths on the filesystem that Sass will look in when resolving imports. For example, if you pass node_modules/susy/sass as a load path, you can use @import "susy" to load node_modules/susy/sass/susy.scss.
🌐
GitHub
github.com › parcel-bundler › parcel › issues › 1800
How to reference a scss files installed to node_modules? · Issue #1800 · parcel-bundler/parcel
July 26, 2018 - I am trying to import a scss file from node_modules. This to be exact: https://github.com/material-components/material-components-web-react/tree/master/packages/button · I tried @import '@material/react-button/index.scss'; in my scss file. This yields this error: /Users/alex/Developer/sasm2/src/app.scss: File to import not found or unreadable: ./@material/react-button/index.scss. at options.error (/Users/alex/Developer/sasm2/node_modules/node-sass/lib/index.js:291:26) I also tried @import '../node_modules/@material/react-button/index.scss'; which results in ·
Author   athei
🌐
npm
npmjs.com › package › sass-import-modules
sass-import-modules - npm
March 31, 2022 - SASS/SCSS helper function to import modules or files from node_modules without the need to specify full paths. For example, @import "node_modules/test/file.scss"; will become @import "test/file";. The order of resolvers is configurable, e.g.
      » npm install sass-import-modules
    
Published   Mar 31, 2022
Version   8.0.0
Author   Martijn Swaagman
Find elsewhere
🌐
Medium
medium.com › anna-coding › how-to-import-scss-file-from-node-modules-abb09b6946b3
How to import scss file from node_modules | by Anna Coding | Anna Coding | Medium
February 19, 2020 - How to import scss file from node_modules To import scss file from node_modues, you need to config the path. Firstly, add .sassrc file under the root and config the path there. Anna Coding Free web …
🌐
npm
npmjs.com › package › node-sass-package-importer
node-sass-package-importer - npm
Custom importer for node-sass to import packages from the node_modules directory.
      » npm install node-sass-package-importer
    
🌐
npm
npmjs.com › package › node-sass-import
node-sass-import - npm
May 8, 2018 - Allows recursive import of SCSS components from local and/or node_modules directories using npm's module resolving algorithm. Latest version: 2.0.1, last published: 8 years ago. Start using node-sass-import in your project by running `npm i ...
      » npm install node-sass-import
    
Published   May 08, 2018
Version   2.0.1
Author   Emmanuel Addo Narh
🌐
Sass
sass-lang.com › documentation › js-api › classes › nodepackageimporter
Sass: NodePackageImporter | JS API
The built-in Node.js package importer. This loads pkg: URLs from node_modules according to the standard Node.js resolution algorithm.
🌐
GitHub
github.com › PatrickJS › angular-starter › issues › 727
How to import from "node_modules" in sass file · Issue #727 · PatrickJS/PatrickJS-starter
December 4, 2020 - I have installed bourbon library through npm, but it's not working when I import it in my stylesheet app.scss @import "bourbon"; How can I add "node_modules" path to the Sass files?
Author   MurhafSousli
🌐
GoRails
gorails.com › forum › how-do-i-import-a-sass-library-from-within-a-node_module-rails-5-1
How do I import a Sass library from within a "node_module" (Rails 5.1)? | GoRails
May 3, 2017 - One thing I will say is I think that you shouldn't have to specify the node_modules folder at all. That should be available in the path I would assume. You should be able to do something like this instead: @import "bulma/sass/utilities/initial-variables"
🌐
GitHub
github.com › Swaagie › sass-import-modules
GitHub - Swaagie/sass-import-modules: SASS/SCSS Import function to import files from node_modules · GitHub
September 1, 2019 - SASS/SCSS helper function to import modules or files from node_modules without the need to specify full paths. For example, @import "node_modules/test/file.scss"; will become @import "test/file";. The order of resolvers is configurable, e.g.
Starred by 7 users
Forked by 7 users
Languages   JavaScript 99.6% | SCSS 0.4%
🌐
npm
npmjs.com › package › sass-module-importer
sass-module-importer - npm
November 16, 2016 - You can now import your Sass/SCSS modules by referencing to the module name, like this: ... This tool it will also inline CSS files for you, since Sass cannot import plain CSS files yet.
      » npm install sass-module-importer
    
Published   Nov 16, 2016
Version   1.4.0
Author   Lucas Motta
🌐
webpack
webpack.js.org › loaders › sass-loader
sass-loader | webpack - JS.ORG
The sass-loader uses Sass's custom importer feature to pass all queries to the webpack resolving engine, enabling you to import your Sass modules from node_modules.
🌐
Npm
npm.io › package › node-sass-import
Node-sass-import NPM | npm.io
Allows recursive import of SCSS components from local and/or node_modules directories using npm's module resolving algorithm. Without the need for tildes(~) to import from node_modules. Allows usage of @import "some-sass-npm-module" akin to require("some-npm-module") in node.js