Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/user-interface/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Wordpress 没有与pattern.s?(c | a)ss“匹配的文件;是在鼠尾草上发现的_Wordpress_Yarnpkg_Roots Sage - Fatal编程技术网

Wordpress 没有与pattern.s?(c | a)ss“匹配的文件;是在鼠尾草上发现的

Wordpress 没有与pattern.s?(c | a)ss“匹配的文件;是在鼠尾草上发现的,wordpress,yarnpkg,roots-sage,Wordpress,Yarnpkg,Roots Sage,当我尝试在Wordpress 5.5.3主题中运行Sage 9.0.10并安装纱线,然后执行“纱线构建”或“纱线开始”时,我会遇到以下错误: 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:

当我尝试在Wordpress 5.5.3主题中运行Sage 9.0.10并安装纱线,然后执行“纱线构建”或“纱线开始”时,我会遇到以下错误:

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之前,它就已经起作用了。重新安装后,会发生这种情况。

遇到相同的问题,数周内都找不到答案。 StyleLintPlugin有一个问题。我所做的是:

  • 在主题名/resources/assets/build中打开webpack.config.js文件
  • Ctrl+F表示“StyleLintPlugin”
  • 注释掉这段代码
新样式插件({
FailOneError:!config.enabled.watcher,
语法:“scss”,

})
最新版本的Sage也发生了这种情况。无论如何都无法让它运行。在my
package.json中使用了这些旧的依赖项:

"devDependencies": {
    "autoprefixer": "~8.2.0",
    "browser-sync": "~2.24.7",
    "browsersync-webpack-plugin": "^0.6.0",
    "bs-html-injector": "~3.0",
    "buble-loader": "^0.4.1",
    "cache-loader": "~1.2.5",
    "clean-webpack-plugin": "^0.1.18",
    "copy-globs-webpack-plugin": "^0.2.0",
    "cross-env": "^7.0.2",
    "css-loader": "^0.28.9",
    "cssnano": "~4.0.5",
    "eslint": "~4.19.1",
    "eslint-loader": "~1.9",
    "eslint-plugin-import": "~2.14.0",
    "extract-text-webpack-plugin": "~3.0.2",
    "file-loader": "^1.1.6",
    "friendly-errors-webpack-plugin": "^1.6.1",
    "imagemin-mozjpeg": "~7.0.0",
    "imagemin-webpack-plugin": "~2.2.0",
    "import-glob": "~1.5",
    "node-sass": "~4.9.4",
    "postcss-loader": "~2.1.0",
    "postcss-safe-parser": "~3.0",
    "resolve-url-loader": "~2.3.1",
    "rimraf": "~2.6",
    "sass-loader": "~6.0",
    "style-loader": "^0.22.1",
    "stylelint": "^8.4.0",
    "stylelint-config-standard": "~18.2.0",
    "stylelint-webpack-plugin": "^0.10.5",
    "uglifyjs-webpack-plugin": "^1.3.0",
    "url-loader": "^0.6.2",
    "webpack": "~3.10.0",
    "webpack-assets-manifest": "^1.0.0",
    "webpack-dev-middleware": "~2.0.4",
    "webpack-hot-middleware": "~2.22.3",
    "webpack-merge": "~4.1.4",
    "yargs": "~11.0.0"
  },
使用了节点版本
8.11.3
,然后执行了干净的安装

  • 删除
    包锁.json
  • 移除
    node\u模块
  • 然后
    npm安装
后来终于成功了

如果您在windows上运行,并且在路径中找不到错误Python2

  • 使用管理权限打开powershell
  • 运行
    npm安装--全局windows构建工具
    (它将轻松安装python)
  • 然后重复上述过程

祝你好运,伙计

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

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


当然,删除了旧的node_modules文件夹,并启动了纱线。很有魅力。

就是这样,谢谢!
"stylelint": "^8.4.0",
"stylelint-config-standard": "~18.2.0",
"stylelint-webpack-plugin": "^0.10.5",