Gulp throwing error: File not found with singular glob
Asked Answered
S

2

32

After renaming my file I am getting the following error when running the gulp build task:

Error: Error: File not found with singular glob: F:\Projects\xyz\HTML\app\css\main.css
    at DestroyableTransform.<anonymous> (F:\Projects\xyz\HTML\node_modules\gulp-useref\lib\streamManager.js:90:36)

main.css file no longer exists as I changed it to style.css but for some reason it is searching for the old file.

Sniffle answered 25/4, 2016 at 11:54 Comment(0)
S
34

As it turns out I missed changing file name in HTML file as it was calling main.css instead of style.css.

<!--build:css css/main.min.css -->
<link rel="stylesheet" href="css/main.css">
<!-- endbuild -->

Changed it to:

<!--build:css css/style.min.css -->
<link rel="stylesheet" href="css/style.css">
<!-- endbuild -->

An honest mistake but I believe someone else can run into something similar :)

Sniffle answered 25/4, 2016 at 11:54 Comment(1)
It may be worth noting that if there are any breakages in your less files (e.g. wrong less file reference or incorrect syntax) your generated css won't be built and thus you'll also run into the same error.Yammer
N
3

In my case, removing these files:

  • package-lock.json
  • node_modules folder
  • any .tmp or dist folder

And then reinstall dependencies using:

npm i
Nordin answered 16/5, 2022 at 20:52 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.