The mdc-image-list package appears to be missing a dependency of feature-targeting.
"@material/image-list": "^0.44.0"
Ubuntu 18.04
yarn add @material/image-list
@import "@material/image-list/mdc-image-list"' in a Sass file
Attempt to compile Sass
Sass should compile without errors.
File to import not found or unreadable: @material/feature-targeting/functions.
Adding feature-targeting to mdc-image-list dependencies should fix this issue.
The Image List package does not directly use the Feature Targeting package (yet). However, we noticed we had a couple of packages that were missing this dependency (including Typography, which Image List depends on) which was fixed in #4403.
This should be fixed in our patch release today.
I get this error in my Angular project although I installed image-list correctly:
@import "@material/feature-targeting/functions";
^
Can't find stylesheet to import.
â•·
21 │ @import "@material/feature-targeting/functions";
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
╵
node_modules/@material/image-list/_mixins.scss 21:9 @import
node_modules/@material/image-list/mdc-image-list.scss 21:9 @import
stdin 2:9
@charlenebuena
Add node_modules to the style preprocessor options in angular.json, so that the import path can be resolved:
"stylePreprocessorOptions": {
"includePaths": [
"./src/styles",
"./node_modules"
]
},
Most helpful comment
I get this error in my Angular project although I installed image-list correctly:
@import "@material/feature-targeting/functions"; ^ Can't find stylesheet to import. ╷ 21 │ @import "@material/feature-targeting/functions"; │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ╵ node_modules/@material/image-list/_mixins.scss 21:9 @import node_modules/@material/image-list/mdc-image-list.scss 21:9 @import stdin 2:9