Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gulp throwing error: File not found with singular glob

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.

like image 318
Imran Bughio Avatar asked Apr 25 '16 11:04

Imran Bughio


2 Answers

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 :)

like image 92
Imran Bughio Avatar answered Sep 29 '22 12:09

Imran Bughio


In my case, removing these files:

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

And then reinstall dependencies using:

npm i
like image 24
Asef Hossini Avatar answered Sep 29 '22 10:09

Asef Hossini