Material-components-web: mdc-image-ist missing feature-targeting dependency

Created on 18 Feb 2019  Â·  3Comments  Â·  Source: material-components/material-components-web

Bugs

The mdc-image-list package appears to be missing a dependency of feature-targeting.

What MDC Web Version are you using?

"@material/image-list": "^0.44.0"

What OS are you using?

Ubuntu 18.04

What are the steps to reproduce the bug?

  • yarn add @material/image-list

  • @import "@material/image-list/mdc-image-list"' in a Sass file

  • Attempt to compile Sass

What is the expected behavior?

Sass should compile without errors.

What is the actual behavior?

File to import not found or unreadable: @material/feature-targeting/functions.

Any other information you believe would be useful?

Adding feature-targeting to mdc-image-list dependencies should fix this issue.

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

All 3 comments

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"
  ]
},
Was this page helpful?
0 / 5 - 0 ratings

Related issues

CyborgSemon picture CyborgSemon  Â·  3Comments

m-alzam picture m-alzam  Â·  3Comments

traviskaufman picture traviskaufman  Â·  3Comments

traviskaufman picture traviskaufman  Â·  4Comments

devshekhawat picture devshekhawat  Â·  3Comments