gpt4 book ai didi

css - npm 脚本中的自动前缀显示 TypeError : Patterns must be a string or an array of strings

转载 作者:行者123 更新时间:2023-11-28 14:06:49 29 4
gpt4 key购买 nike

当我运行 npm run prefix:css 它显示

TypeError: Patterns must be a string or an array of strings

{
"name": "natours",
"version": "1.0.0",
"description": "A natours project",
"main": "index.js",
"scripts": {
"watch:sass": "node-sass sass/main.scss css/style.css -w",
"compile:sass": "node-sass sass/main.scss css/style.comp.css",
"concat:css": "concat -o css/style.concat.css css/icon-font.css
css/style.comp.css",
"prefix:css": "postcss --use autoprefixer -b 'last 10 versions'
css/style.concat.css -o css/style.prefix.css"
},
"author": "Rahmat",
"license": "ISC",
"devDependencies": {
"autoprefixer": "^9.6.1",
"concat": "^1.0.3",
"node-sass": "^4.12.0",
"postcss-cli": "^6.1.3"
}
}

这是我的 packge.json 文件

错误图片是 - enter image description here

我该如何解决?

最佳答案

"prefix:css": "postcss --use autoprefixer -b\"last 10 versions\"css/style.comp.css -o css/style.prefix.css",

我想你需要用字符串试试这个...

关于css - npm 脚本中的自动前缀显示 TypeError : Patterns must be a string or an array of strings,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57122346/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com