【问题标题】:Files glob patterns specified did not match any files指定的文件 glob 模式与任何文件都不匹配
【发布时间】:2016-08-07 12:36:28
【问题描述】:

我有问题。当我跑步时:npm run stylelint。我的 cmd 显示通知

moutain-mental-website@0.0.0 stylelint E:\Mountain_Mental
> stylelint 'public/css/**/*.scss'

Error: Files glob patterns specified did not match any files
    at E:\Mountain_Mental\node_modules\stylelint\dist\standalone.js:83:19

【问题讨论】:

    标签: node.js npm stylelint


    【解决方案1】:

    试试双引号:

    > stylelint "public/css/**/*.scss"
    

    【讨论】:

    • @stevemao 通常在 shell 语言中,双引号允许扩展/插入特殊字符,而单引号提供文字字符串,如果您想避免扩展(即,您的字面意思是 *特点)。 gnu.org/software/bash/manual/html_node/Double-Quotes.html
    • 是的,我在发表评论后正在考虑这个问题 :) 但是为什么传递文字 * 字符在 Mac 和 Linux 中可以工作,而在 Windows 中不行?我认为文字字符串会传递给node-glob?非常感谢!
    • @stevemao Windows 对文件路径的特殊字符限制比 Mac 和 Linux 更多。也许这也是node-glob 所固有的,但我不确定。请参阅此处以获取更全面的答案serverfault.com/a/150744/355340
    • 所以这只发生在 Windows 上然后 :O 因为我正在使用"lint-styles": "stylelint './src/**/*.css'", 并且这不会正常失败
    猜你喜欢
    • 1970-01-01
    • 2016-10-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-05-22
    • 2017-02-08
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多