【问题标题】:Error: No files matching the pattern "'./src/views/{tokens,atoms,molecules,organisms}/**/*.scss'" were found错误:找不到与模式“'./src/views/{tokens,atoms,molecules,organisms}/**/*.scss'”匹配的文件
【发布时间】:2021-01-20 04:02:19
【问题描述】:

windows 环境 上运行 stylelint 命令时出错:

命令: "lint-styles": "stylelint ./src/views/{tokens,atoms,molecules,organisms}/**/*.scss --fix",

出现错误:

Error: No files matching the pattern "'./src/views/{tokens,atoms,molecules,organisms}/**/*.scss'" were found.
at globby.then (C:\workplace\Ulta\web-common\node_modules\stylelint\lib\standalone.js:212:12)
at process._tickCallback (internal/process/next_tick.js:68:7)

虽然在 Mac 上没有错误。我应该改变什么?

【问题讨论】:

    标签: reactjs webpack eslint stylelint


    【解决方案1】:

    所以问题出在文件夹名称上,我将 tokens,atoms,molecules,organisms 更改为 Tokens,Atoms,Molecules,Organisms

    因为我的文件夹名称以 capitals 开头,但在命令中我使用的是第一个字母小。虽然它可以在 mac 上运行。

    【讨论】:

      【解决方案2】:

      你需要quotes around your glob:

      "lint-styles": "stylelint \"./src/views/{tokens,atoms,molecules,organisms}/**/*.scss\" --fix"
      

      【讨论】:

        猜你喜欢
        • 2021-01-12
        • 2021-03-16
        • 2020-08-05
        • 1970-01-01
        • 1970-01-01
        • 2021-04-17
        • 1970-01-01
        • 2020-11-14
        相关资源
        最近更新 更多