Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import sass from npm package, that imports sass from another npm package #255

Open
tomscholz opened this issue Jul 17, 2017 · 4 comments
Open

Comments

@tomscholz
Copy link

Before I get into this, I know there are several issue with importing sass from a npm package, but I think that this is a little bit different, since the sass file I am importing is trying to import another sass file from another npm package.

Here we go:
I want to use material design components for web inside my meteor application. Unfortunately when importing mdc from the npm package like this:

@import "{}/node_modules/material-components-web/material-components-web";

I get the following error:

While processing files with fourseven:scss (for target web.browser):
/client/stylesheets/Application.scss: Scss compiler error: File to import: @material/animation/mdc-animation not found in
file: {}/node_modules/material-components-web/material-components-web.scss

I guess this is due to the structure of mdc. The material-components-web.scss file imports all the single components, that are located in node_modules/@material, not inside node_modules/material-components-web.

Any suggestion how I can resolve this?

@vuhrmeister
Copy link

vuhrmeister commented Aug 4, 2017

You need to create a scss-config.json file as described here: https://github.com/fourseven/meteor-scss#global-include-path

The content of that file would be:

{
  "includePaths": [
    "{}/node_modules/"
  ]
}

However, with that it's not done. It fails with File to import: ./mixins not found. Here I'm stuck, too, didn't find a solution yet.

@yanickrochon
Copy link

This is perhaps one of the most frustrating "feature" of this package....

@tomscholz
Copy link
Author

tomscholz commented Apr 19, 2018

I've learned react and use material-ui now. That solved the problem for me

@macrozone
Copy link

this used to work with meteor 1.6.1 but is now broken with meteor 1.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants