首页 > 解决方案 > 在 Sage 上找不到与模式 .s?(c|a)ss" 匹配的文件

问题描述

当我尝试在我的 Wordpress 5.5.3 主题中运行 Sage 9.0.10 并安装 Yarn 然后执行“yarn build”或“yarn start”时,我收到此错误:

PS C:\xampp\htdocs\patrick.visiegroep\wp-content\themes\visiegroep> yarn build
yarn run v1.22.5

$ webpack --progress --config resources/assets/build/webpack.config.js

Error: No files matching the pattern "C:\xampp\htdocs\patrick.visiegroep\wp-content\themes\visiegroep\resources\assets\**\*.s?(c|a)ss" were found.
    at C:\xampp\htdocs\patrick.visiegroep\wp-content\themes\visiegroep\node_modules\stylelint\lib\standalone.js:212:12
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
PS C:\xampp\htdocs\patrick.visiegroep\wp-content\themes\visiegroep>

我总是用“构建”和“开始”

Error: No files matching the pattern "C:\xampp\htdocs\patrick.visiegroep\wp-content\themes\visiegroep\resources\assets\**\*.s?(c|a)ss"

而且我找不到哪里出了问题,因为在我不得不对我的整个 Wordpress 和 Sage 进行核对之前,它曾经可以工作。重新安装后会出现这种情况。

标签: wordpressyarnpkgroots-sage

解决方案


我有同样的问题,我只更新了 3 个开发依赖项。我从 sage 9.0.9 中拿走了它们,所以我更新了

"stylelint": "^13.7.2",
"stylelint-config-standard": "^20.0.0",
"stylelint-webpack-plugin": "^0.10.5",

"stylelint": "^8.4.0",
"stylelint-config-standard": "~18.2.0",
"stylelint-webpack-plugin": "^0.10.5",

当然删除了旧的 node_modules 文件夹,并启动了纱线。奇迹般有效。


推荐阅读