Gulp throwing error: File not found with singular

2019-04-18 23:28发布

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.

1条回答
▲ chillily
2楼-- · 2019-04-18 23:58

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

查看更多
登录 后发表回答