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

node_modules does not seem to be an included path for Sass in CRA 2.0 #4651

Closed
jimbojetlag opened this issue Jun 19, 2018 · 4 comments
Closed
Labels

Comments

@jimbojetlag
Copy link

I am not sure if this is a bug, or a feature. Apparently, node_modules/ directory is not an included path for Sass in CRA 2.0.

As instructed in #2859, node_modules/ prefix should be used when importing sass files from libraries. Including this prefix is not conventional in sass projects.

But then, even when using that prefix, libraries that import sass files other libraries will cause the File to import not found or unreadable error.

As an example, using @material/react-top-app-bar:

import 'node_modules/@material/react-top-app-bar/index.scss';

gives the error:

File to import not found or unreadable: @material/top-app-bar/mdc-top-app-bar.
      in node_modules/@material/react-top-app-bar/index.scss (line 1, column 1)
@bugzpodder
Copy link

Does: import '~@material/react-top-app-bar/index.scss'; work?

@jimbojetlag
Copy link
Author

jimbojetlag commented Jun 19, 2018

Does: import '~@material/react-top-app-bar/index.scss'; work?

It only works for the application, not the libraries.

@jimbojetlag jimbojetlag changed the title node_modules does not seem to an included path for Sass in CRA 2.0 node_modules does not seem to be an included path for Sass in CRA 2.0 Jun 20, 2018
@stale
Copy link

stale bot commented Nov 2, 2018

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 7 days if no further activity occurs.

@stale stale bot added the stale label Nov 2, 2018
@Timer Timer closed this as completed Nov 2, 2018
@jayantbh
Copy link
Contributor

For anyone stumbling across this from a Google search, this helped me:
#5599 (comment)

@lock lock bot locked and limited conversation to collaborators Jan 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants