-
Notifications
You must be signed in to change notification settings - Fork 865
anyone know what causes error:file to import not found or unreadable #731
Comments
What directory is app.scss in? |
I would check again. That is the error you get when you try to import a file that isn't there. I even added the import to see what would happen.
|
Its any scss file but it only happens intermittently, they files are definitely there. it will happen for a while and the site doesn't load css, but if i carry on making more changes eventually the error goes away and the site loads normally |
the files are in the scss folder |
So |
yes thats right `/* The Foundation framework is built by Zurb // Settings // WP overrides // Third-party libraries // Foundation global styles // Individual foundation components // Motion UI /* // Modules // Components // Templates |
Ok, I think it's because your file is named |
Hi I’ve already tried that, in fact it stated as _app.scss then changed to app.scss after I started getting the error
|
Well change it back to |
And is this the same project you were having trouble with earlier with the permissions issue on the server? |
It is a new project.. I think the problem may be that I am working remotely, as in I am connecting to the site via Coda from home and the site is on the server at work, which is also running the watch command. Could it be that there is a delay when saving the file and so watch is detecting a change before the file has finished saving? I don't know this is just a guess as I haven't got the error while at work |
Sounds like you are probably correct about that if it works fine from your work. A better option might be to run a vagrant box on the machine you use at home when you're developing and use git to push changes to the remote when you are satisfied with the results. |
Ok thanks I'll look into it ... I was wondering if there was any way to add a delay before it tries to process the changes |
Check out gulp-wait |
Problem solved? |
Yes thanks, closed |
For now the gulp-wait is the only "solution" when coding with Visual Studio Code for me. |
I was having this issue when saving in sublime. The first time the file changed, gulp watch would fire before the file either completed saving, or was unreadable when lib-sass started. I added a 50ms delay to the pipe which seems to work. |
Guys, I have same trouble. Where should I use gulp-wait to solve this trouble? |
Hi @bobberr , i have done mine as follows (i'm using VSCode terminal to do the gulp watch): gulp.task('sass', function () {
return gulp.src(SCSS_SRC)
.pipe(wait(500))
.pipe(sass({
outputStyle: 'compressed',
includePaths: ['./bower_components/susy/sass', './bower_components/breakpoint-sass/stylesheets']
}).on('error', sass.logError))
.pipe(concat('style.css'))
.pipe(autoprefixer({
browsers: ['>1%', 'last 2 versions'],
cascade: false
}))
.pipe(gulp.dest('./dist/css'));
}); |
Thanks for help :) |
The wait is a very awkward solution which differs depending on your machine's speed. On my machine at home I can get away with wait(50) but at work it needs to be around 1000 to work consistently. Any idea what the actual cause of this is in VSCode and if there's a setting that could prevent it? |
😠 Lost 5 hours behind this bullshit 😠 . In my case was just the difference between @import
|
@AionDev sorry for the late reply, but your issue is syntax-related which is different from the problem people are experiencing with the build system. |
Thanks for the gulp-wait hint. |
For sass save error, see: olefredrik/FoundationPress#731 (comment)
Was facing the same issue, installing gulp-wait solved the problem.thanks @leandro-almeida |
@Sam-Pryor's fixed solved it for me. Thx m8. |
but in vscode(1.22.1) what should i do? |
I was having this same issue. I was using gulp-watch to watch the scss files and compile them and finally inject it to the browser. I found that this issue will not occur if you have few folders (eg. 2 folders ) containing the few scss files. But when the folders and scss becomes plenty, you will start to have this issue. The only solution that worked for me was to install gulp-wait and delay the scss compilation. |
thanks @leandro-almeida , problem solved .... |
Thanks @leandro-almeida and @colin-marshall. gulp-wait solved this issue for me. |
solved! remove ~ |
Ive started getting the following error
[21:20:31] gulp-notify: [Sass Error] assets/scss/foundation.scss
Error: File to import not found or unreadable: app
Parent style sheet: stdin
on line 91 of stdin
but not just on app.scss, its happening on all of them.
All files are there and scss is still compiling, well sometimes it is
The text was updated successfully, but these errors were encountered: