在npm中运行前缀时遇到麻烦

问题描述

我正在尝试运行CSS前缀,并且已经在开发环境中安装了前缀npm软件包和postcss-cli软件包。在为我的CSS文件运行前缀时,出现了一些错误。这是错误日志-

appBar: PreferredSize(
      preferredSize:  Size.fromHeight(70.0),child: AppBar(
      elevation: 10,automaticallyImplyLeading: false,backgroundColor: Colors.red,title:  Text('Edit',style:
              TextStyle(fontSize: MediaQuery.of(context).size.width*0.1),),actions: <Widget>[
          isVisibile
              ?  Container(
            height: 50,width: 50,child: Padding(
                  padding:  EdgeInsets.only(right:MediaQuery.of(context).size.width*0.3),child: IconButton(
                        icon:  Icon(
                            Icons.save,color: Colors.white,size: MediaQuery.of(context).size.width*0.1,onpressed: () {
                          
                        },)

              : Container(),isInvisible
              ? Padding(
                padding: EdgeInsets.only(right:MediaQuery.of(context).size.width*0.05,bottom: MediaQuery.of(context).size.height*0.05),child: IconButton(
                    icon: Icon(
                      Icons.done,onpressed: () async {
                      // approve
                    },)
              : Container(),],//),

&这是JSON文件-

TypeError: Patterns must be a string or an array of strings
    at assertPatternsInput (E:\CODING GOOGLE DRIVE\css-SAAS\Natours\starter\node_modules\globby\index.js:16:9)
    at generateGlobTasks (E:\CODING GOOGLE DRIVE\css-SAAS\Natours\starter\node_modules\globby\index.js:41:2)
    at module.exports (E:\CODING GOOGLE DRIVE\css-SAAS\Natours\starter\node_modules\globby\index.js:115:20)
    at E:\CODING GOOGLE DRIVE\css-SAAS\Natours\starter\node_modules\postcss-cli\index.js:59:14
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! isuro-portfolio@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 isuro-portfolio@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\isuro\AppData\Roaming\npm-cache\_logs\2020-08-22T04_51_28_876Z-debug.log

无法理解我犯了什么类型的错误。我也仔细检查了一切。任何帮助将不胜感激。

解决方法

我觉得这里单引号是行不通的,我们需要加双引号,这是错误地提到的。它对我有用!

尝试使用

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