Gulp throwing error: File not found with singular glob
Gulp throwing error: File not found with singular glob
重命名文件后,运行 gulp 构建任务出现以下错误:
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 文件不再存在,因为我将其更改为 style.css 但由于某种原因它正在搜索旧文件。
事实证明我错过了更改 HTML 文件中的文件名,因为它正在调用 main.css 而不是 style.css.
<!--build:css css/main.min.css -->
<link rel="stylesheet" href="css/main.css">
<!-- endbuild -->
更改为:
<!--build:css css/style.min.css -->
<link rel="stylesheet" href="css/style.css">
<!-- endbuild -->
一个无心的错误,但我相信其他人可以 运行 做出类似的事情 :)
就我而言,删除这些文件:
package-lock.json
node_modules
文件夹
- 任何
.tmp
或dist
文件夹
然后使用以下方法重新安装依赖项:
npm i
重命名文件后,运行 gulp 构建任务出现以下错误:
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 文件不再存在,因为我将其更改为 style.css 但由于某种原因它正在搜索旧文件。
事实证明我错过了更改 HTML 文件中的文件名,因为它正在调用 main.css 而不是 style.css.
<!--build:css css/main.min.css -->
<link rel="stylesheet" href="css/main.css">
<!-- endbuild -->
更改为:
<!--build:css css/style.min.css -->
<link rel="stylesheet" href="css/style.css">
<!-- endbuild -->
一个无心的错误,但我相信其他人可以 运行 做出类似的事情 :)
就我而言,删除这些文件:
package-lock.json
node_modules
文件夹- 任何
.tmp
或dist
文件夹
然后使用以下方法重新安装依赖项:
npm i