Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/41.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';不被认为是内部的或外部的_Css_Node.js_Command Line_Npm - Fatal编程技术网

错误:';清洁CSS';不被认为是内部的或外部的

错误:';清洁CSS';不被认为是内部的或外部的,css,node.js,command-line,npm,Css,Node.js,Command Line,Npm,我刚刚通过npm命令行安装了cleancss(),我想用它连接和缩小一些css文件(duh)。但是,我遇到了以下错误: 'cleancss' is not a recognized as an internal or external command, operable program or batch file. 我不熟悉从命令行做事情,所以这完全让我陷入了一个循环。我找不到这个干净的css特定问题的答案。这类错误的一般答案似乎是需要更新环境变量,但尽管我在过去这样做是为了指向某些可执行文件

我刚刚通过npm命令行安装了cleancss(),我想用它连接和缩小一些css文件(duh)。但是,我遇到了以下错误:

'cleancss' is not a recognized as an internal or external command, operable program or batch file.
我不熟悉从命令行做事情,所以这完全让我陷入了一个循环。我找不到这个干净的css特定问题的答案。这类错误的一般答案似乎是需要更新环境变量,但尽管我在过去这样做是为了指向某些可执行文件,但我不确定在这个特定场景中我必须做什么。有人吗?

尝试使用安装

npm install -g clean-css
使用全局选项应使其在shell中可用。

尝试使用安装在中

npm install -g clean-css

使用全局选项应该可以在shell中使用。

我遇到了这个问题,从4.0开始,需要安装clean css cli。我不相信,我只是在这里找到了答案:

我遇到了这个问题,从4.0开始,需要安装clean css cli。我不相信,我只是在这里找到了答案:

是的,就是这样。谢谢!是的,就是这样。谢谢!