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

Sass: File to import not found or unreadable: ~theme/common #2087

Closed
olalonde opened this issue Jun 26, 2016 · 3 comments
Closed

Sass: File to import not found or unreadable: ~theme/common #2087

olalonde opened this issue Jun 26, 2016 · 3 comments
Labels
needs info Blocked on user response

Comments

@olalonde
Copy link

I am using Sass with Webpack which allows me to prefix imports with ~ which tells webpack to load the file from node_modules or other directories defined in webpack.config.js. I was wondering if there were any way to tell sass to look up in those directories as well so I can get rid of the "File to import not found or unreadable" errors I am getting in Vim/Syntastic.

Example:

@import "~theme/common";

Generates the following error:

ui/PageHeader/styles.scss|1 error| File to import not found or unreadable: ~theme/common.

Related: vim-syntastic/syntastic#1799

@chriseppstein
Copy link

are you using ruby sass or node-sass? The answer for how to do this varies by implementation.

@chriseppstein chriseppstein added the needs info Blocked on user response label Jun 28, 2016
@olalonde
Copy link
Author

ruby sass I believe.

Syntastic version: 3.7.0-129 (Vim 704, Darwin)
Info for filetype: scss
Global mode: active
Filetype scss is active
The current file will be checked automatically
Available checker: sass
Currently enabled checker: sass
The current file will not be checked (file not readable / not local)
~$ which sass
/Users/olalonde/.rbenv/shims/sass
~$ sass --version
Sass 3.4.21 (Selective Steve)

@chriseppstein
Copy link

@olalonde is webpack looking for css files or other Sass files?

There's this one: https://github.com/jtangelder/sass-loader but it's meant to be used with node-sass.

This one claims to work with ruby sass: https://www.npmjs.com/package/ruby-sass-loader, but a quick scan of the implementation tells me it probably doesn't work too well. The right way would use a ruby library to create an Importer not unlike this one I made

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

No branches or pull requests

2 participants