Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/meteor/3.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
Css Autoprefixer脚本没有';t运行类型错误:模式必须是字符串或字符串数组_Css_Npm_Sass_Postcss_Autoprefixer - Fatal编程技术网

Css Autoprefixer脚本没有';t运行类型错误:模式必须是字符串或字符串数组

Css Autoprefixer脚本没有';t运行类型错误:模式必须是字符串或字符串数组,css,npm,sass,postcss,autoprefixer,Css,Npm,Sass,Postcss,Autoprefixer,我已成功安装autoprefixer和postcss cli。我正在尝试使用命令提示符和VS代码“使用NPM脚本设置一个简单的构建过程”。我正在看一个关于CSS/SASS主题的教程,因为我只有2个月的编码经验,还不太了解如何调试。我完成了我想要的代码,现在我正在尝试将所有内容编译成一个压缩的style.css文档。。。我成功地连接了所有内容,但现在在前缀方面遇到了问题 在命令提示符中,我键入:npm run prefix:css,该脚本正在运行: postcss——使用autoprefixer-

我已成功安装autoprefixer和postcss cli。我正在尝试使用命令提示符和VS代码“使用NPM脚本设置一个简单的构建过程”。我正在看一个关于CSS/SASS主题的教程,因为我只有2个月的编码经验,还不太了解如何调试。我完成了我想要的代码,现在我正在尝试将所有内容编译成一个压缩的style.css文档。。。我成功地连接了所有内容,但现在在前缀方面遇到了问题

在命令提示符中,我键入:
npm run prefix:css
,该脚本正在运行:
postcss——使用autoprefixer-b'last 10 versions'css/style.concat.css-o css/style.prefix.css

我得到:

TypeError: Patterns must be a string or an array of strings 
 at assertPatternsInput (C:\Users\mjpry\Desktop\advanced-css-course master\Natours\starter\node_modules\globby\index.js:17:9)
    at generateGlobTasks (C:\Users\mjpry\Desktop\advanced-css-course-master\Natours\starter\node_modules\globby\index.js:42:2)
    at module.exports (C:\Users\mjpry\Desktop\advanced-css-course-master\Natours\starter\node_modules\globby\index.js:116:20)
    at C:\Users\mjpry\Desktop\advanced-css-course-master\Natours\starter\node_modules\postcss-cli\index.js:59:14
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! natours@1.0.0 prefix:css: `postcss --use autoprefixer -b 'last 10 versions' css/style.concat.css -o css/style.prefix.css`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the natours@1.0.0 prefix:css script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\mjpry\AppData\Roaming\npm-cache\_logs\2020-01-29T23_00_22_951Z-debug.log
就像我说的。。。。没有足够的经验来解决这个问题。我怀疑这不是节点_模块的问题,就像这个错误似乎正在捕获。。。但我不知道该怎么办。救命啊

如果您正在使用windows(并且按照路径显示的方式操作),请尝试以下操作:

postsss——使用autoprefixer-b \“最后10个版本\”css/style.concat.css-o css/style.prefix.css


发件人:

欢迎来到Stackoverflow!这回答了你的问题吗?好的…那就行了。那么windows就是不懂单引号?我很感激!显然,我也需要提高我的搜索技能。