question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Issue with includePath, it works randomly!

See original GitHub issue
Error in plugin 'sass'
Message:
    ..\css\style.scss
Error: File to import not found or unreadable: includes/feed.scss
       Parent style sheet: D:/my_folder/app/raw_assets/css/style.scss
        on line 24 of ../css/style.scss
>> @import "includes/profile.scss";
[BS] 2 files changed (fonts.css, navbar.css)
//should be 10 files changed, not 2

When I hit the Ctrl+S key of my text editor, I get this error most of the times, but not always. Read again, when saving, not always the error is thrown :\ Also, it happens only when modifying the includes, not with the main scss file.

My gulp task:

scssOptions = 
    errLogToConsole: true
    outputStyle: 'compressed'
    includePaths: [ 'raw_assets/css/includes', 'css/includes', 'includes' ] # I tried different paths, none of them is apparently correct..

gulp.task 'scss', ->
    gulp.src( srcPath )
      .pipe scss.sync(scssOptions).on('error', scss.logError) # Same error even if not using .sync()
      .pipe autoprefixer() 
      .pipe gulp.dest(scssOutput)
      .pipe browserSync.reload({stream: true})

gulp.task 'scss-watch', ->
    gulp.watch srcPath, [ 'scss' ]

->  
    gulp.start 'scss', 'scss-watch'

Folder structure:

| /raw_assets
     |___ /gulpfile
         |___ gulpfile.coffee
         |___ /folder of gulp tasks

    |___ /scss
        |___ /includes
            |___ various .scss includes files
        |___ style.scss

| / app
    |___ css
        |___ style.css

PS: I’m on win10 x64 gulp v. 3.9.1 gulp-sass v.2.3.2

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:9

github_iconTop GitHub Comments

1reaction
kimmanwkycommented, Nov 29, 2016

+1 having the same issue too, anyone with the way to solve this?

To explain further on my issue, the error will occurs roughly 50% of the time with a empty line break between styles (or at last row) in the scss file. The first time I CTRL + S to save, it will hit the error. However, on the 2nd save (without any changes), it can compile properly. It might happen in vice versa too (removing some of the empty line).

Is this because of the nature of gulp parallel processing issue? The compile task is somehow processed faster than some tasks?

0reactions
harvzorcommented, Feb 9, 2019

Switching to Gulp@4.0.0 seems to have helped - I no longer need the hacky wait solution.

Read more comments on GitHub >

github_iconTop Results From Across the Web

include errors detected. Please update your includepath.
There are currently some IntelliSense issues when trying to work with multiple projects in one workspace. This could be a new issue.
Read more >
VSCode not recognizing includes from includepath
You have to understand that Visual Studio Code is not an IDE and can't compile by itself. You should have an file called ......
Read more >
Include errors detected - PlatformIO IDE
Try to use 1 project per 1 workspace. This is a bug of C/C++ extension #4976. You can skip this workaround when this...
Read more >
How to Fix Include Path Error in C/C++ Files using ... - YouTube
How to fix vscode error: #include errors detected. Please update your includePath.***************************Free Document ...
Read more >
qt .pro file INCLUDEPATH issue - qgis
In the Qt .pro file, I am including QGIS libraries like following: QGIS_DIR = /home/unibw/dev/QGIS BUILD_DIR ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found