Can't find stylesheet to import Angular Origin: On your device Last updated 15 Oct 2026

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.

Exact message you may see 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
Seen on: Angular Angular CLI

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 @import and @use rules incorrectly

⚡ Quick fix

  1. Fix the path relative to the importing file
  2. Add stylePreprocessorOptions.includePaths for shared styles
  3. Prefer @use 'sass:math'-style modern syntax and absolute project paths

Detailed fix by platform

Angular CLI

  1. In angular.json: "stylePreprocessorOptions": { "includePaths": ["src/styles"] }
  2. Then @use 'variables' as *;

Code examples

angular.json include paths

json
"build": {
  "options": {
    "stylePreprocessorOptions": { "includePaths": ["src/styles"] },
    "styles": ["src/styles.scss"]
  }
}

How to diagnose

  1. Path — Does the file exist where Sass looks?
  2. Name — Partial underscore and case?
  3. 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:

Where this error sits

Origin: On your device. Errors that are often confused with or caused by this one (click to open):

Cannot find control with name — Angular: Error: Cannot find control with name: 'email' (reactive forms) (Angular)Cannot find control w…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' (Angular)Could not find the bu…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 (Angular)exceeded maximum budg…Module parse failed — Module parse failed: Unexpected token. You may need an appropriate loader to handle this file type (React)Module parse failedNG0912 — Angular: NG0912: Component ID generation collision detected. Components 'A' and 'B' with selector 'app-x' use the same ID (Angular)NG0912Schema validation failed with the following errors — Angular CLI: Schema validation failed with the following errors: Data path "" must NOT have additional properties(xyz) (Angular)Schema validation fai…Vite failed to resolve import — [vite] Internal server error: Failed to resolve import "x" from "src/App.jsx". Does the file exist? (React)Vite failed to resolv…Can't fin…

Explore the map of this error Full error map →

🧠 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.