0

I have never actively used sass, but Google's Material Design is written so that I need sass. But I stumbled upon this error and can't find out what is wrong.

Error: Can't find stylesheet to import.
   ╷
26 │ @use '@material/feature-targeting/feature-targeting';
   │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   ╵
  node_modules\@material\theme\_theme.scss 26:1  @forward
  node_modules\@material\theme\_index.scss 17:1  @use

Line 26 in _theme.scss looks like this:

@use '@material/feature-targeting/feature-targeting';

This target file is from npm install @material/feature-targeting. Is there something wrong with the file _theme.scss from Google or did I do something wrong? (There is a file node_modules/@material/feature-target/_feature-target.scss. Is perhaps the underscore missing in line 26 in _theme.scss?)

The file I give to sass is this one:

@use "../node_modules/@material/theme" with (
  $primary: #fcb8ab,
  $secondary: #feeae6,
  $on-primary: #442b2d,
  $on-secondary: #442b2d,
);
@use "@material/button/mdc-button";
Leo
  • 4,136
  • 6
  • 48
  • 72

0 Answers0