wordpress - 在 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 进行核对之前,它曾经可以工作。重新安装后会出现这种情况。
解决方案
我有同样的问题,我只更新了 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 文件夹,并启动了纱线。奇迹般有效。
推荐阅读
- php - 在 laravel 刀片中访问多维数组
- c# - 正则表达式模式仅在第二个交替时匹配
- angular - 如何使用插值更改角度 6 中的变量?
- node.js - 节点 fs.readFile 函数
- sql - 跨多个表删除多行
- c# - 库存类别系统的 TreeView 中的 C# 唯一 ID
- openstreetmap - 与 OpenStreetMap 相比,使用边界框的 HERE Map Image API 得到不同的结果
- python - 删除地址标签并拆分
- java - 为什么我们在 java 中使用 string.charAt(index)-'a'?
- python - 使用用户 tkinter 输入作为 Matplotlib 坐标绘制一条线