Angular (Sass): Error: Can't find stylesheet to import. @import 'variables';
A Sass @import / @use cannot resolve its path — wrong relative path, missing underscore partial, or the include path is not configured.
Can't find stylesheet to importError: Can't find stylesheet to import.Can't find stylesheet to import. @importUndefined variable Sass AngularCan't find stylesheet to import. @use Meaning
Sass resolves paths relative to the importing file, then through stylePreprocessorOptions.includePaths. Common issues: the file is _variables.scss but the path is wrong, @use with the wrong namespace, importing a package without ~/node_modules path (newer Sass resolves node_modules automatically in Angular), or the file does not exist.
Common causes
- Wrong relative path or file name/case
- Partial file missing or misnamed (
_variables.scss) - Include path not configured for shared styles
- Importing a node_modules file with a wrong path
- Mixing
@importand@userules incorrectly
⚡ Quick fix
- Fix the path relative to the importing file
- Add
stylePreprocessorOptions.includePathsfor shared styles - Prefer
@use 'sass:math'-style modern syntax and absolute project paths
Detailed fix by platform
Angular CLI
- In angular.json:
"stylePreprocessorOptions": { "includePaths": ["src/styles"] } - Then
@use 'variables' as *;
Code examples
angular.json include paths
"build": {
"options": {
"stylePreprocessorOptions": { "includePaths": ["src/styles"] },
"styles": ["src/styles.scss"]
}
}How to diagnose
- Path — Does the file exist where Sass looks?
- Name — Partial underscore and case?
- Config — includePaths set?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
- Cannot find control with name Angular: Error: Cannot find control with name: 'email' (reactive forms)
- Could not find the builder's node package Angular CLI: Could not find the '@angular-devkit/build-angular:browser' builder's node package / Cannot find module '@angular-devkit/build-angular/package.json'
- exceeded maximum budget Angular build: Error: bundle initial exceeded maximum budget. Budget 1.00 MB was not met by 120.00 kB with a total of 1.12 MB
Most viewed in Angular
Other ways to find it
Where this error sits
Origin: On your device. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 15 Oct 2026