找不到更少的插件清理CSS

时间:2019-07-08 05:51:26

标签: npm less clean-css

我安装的较少,它是通过npm的clean-css插件。但是,当我尝试通过命令行构建CSS时,总是收到消息,提示找不到clean-css插件。

我尝试卸载并重新安装两个软件包。但是错误不断出现。

我做什么:

我通过npm安装了越来越少的plugin-clean-css:

npm install less -g
npm install less-plugin-clean-css -g

我检查了已安装的软件包:

C:\ Users \ MyUserName \ AppData \ Roaming \ npm

+-- less@3.8.1
| +-- clone@2.1.2
| +-- errno@0.1.7
| | `-- prr@1.0.1
| +-- graceful-fs@4.2.0
| +-- image-size@0.5.5
| +-- mime@1.6.0
| +-- mkdirp@0.5.1
| | `-- minimist@0.0.8
| +-- promise@7.3.1
| | `-- asap@2.0.6
| +-- request@2.88.0
| | +-- aws-sign2@0.7.0
| | +-- aws4@1.8.0
| | +-- caseless@0.12.0
| | +-- combined-stream@1.0.8
| | | `-- delayed-stream@1.0.0
| | +-- extend@3.0.2
| | +-- forever-agent@0.6.1
| | +-- form-data@2.3.3
| | | +-- asynckit@0.4.0
| | | +-- combined-stream@1.0.8 deduped
| | | `-- mime-types@2.1.24 deduped
| | +-- har-validator@5.1.3
| | | +-- ajv@6.10.1
| | | | +-- fast-deep-equal@2.0.1
| | | | +-- fast-json-stable-stringify@2.0.0
| | | | +-- json-schema-traverse@0.4.1
| | | | `-- uri-js@4.2.2
| | | |   `-- punycode@2.1.1
| | | `-- har-schema@2.0.0
| | +-- http-signature@1.2.0
| | | +-- assert-plus@1.0.0
| | | +-- jsprim@1.4.1
| | | | +-- assert-plus@1.0.0 deduped
| | | | +-- extsprintf@1.3.0
| | | | +-- json-schema@0.2.3
| | | | `-- verror@1.10.0
| | | |   +-- assert-plus@1.0.0 deduped
| | | |   +-- core-util-is@1.0.2
| | | |   `-- extsprintf@1.3.0 deduped
| | | `-- sshpk@1.16.1
| | |   +-- asn1@0.2.4
| | |   | `-- safer-buffer@2.1.2 deduped
| | |   +-- assert-plus@1.0.0 deduped
| | |   +-- bcrypt-pbkdf@1.0.2
| | |   | `-- tweetnacl@0.14.5 deduped
| | |   +-- dashdash@1.14.1
| | |   | `-- assert-plus@1.0.0 deduped
| | |   +-- ecc-jsbn@0.1.2
| | |   | +-- jsbn@0.1.1 deduped
| | |   | `-- safer-buffer@2.1.2 deduped
| | |   +-- getpass@0.1.7
| | |   | `-- assert-plus@1.0.0 deduped
| | |   +-- jsbn@0.1.1
| | |   +-- safer-buffer@2.1.2
| | |   `-- tweetnacl@0.14.5
| | +-- is-typedarray@1.0.0
| | +-- isstream@0.1.2
| | +-- json-stringify-safe@5.0.1
| | +-- mime-types@2.1.24
| | | `-- mime-db@1.40.0
| | +-- oauth-sign@0.9.0
| | +-- performance-now@2.1.0
| | +-- qs@6.5.2
| | +-- safe-buffer@5.2.0
| | +-- tough-cookie@2.4.3
| | | +-- psl@1.2.0
| | | `-- punycode@1.4.1
| | +-- tunnel-agent@0.6.0
| | | `-- safe-buffer@5.2.0 deduped
| | `-- uuid@3.3.2
| `-- source-map@0.6.1
+-- less-plugin-clean-css@1.5.1
| `-- clean-css@3.4.28
|   +-- commander@2.8.1
|   | `-- graceful-readlink@1.0.1
|   `-- source-map@0.4.4
|     `-- amdefine@1.0.1

然后我运行以下命令:

lessc less/screen.default.less "css/screen.min.css" 

它按预期工作。 当我跑步...

lessc less/screen.default.less "css/screen.min.css" --clean-css="--s1 --advanced --compatibility=ie8"

...我明白了

Unable to load plugin clean-css please make sure that it is installed under or at the same level as less

我在做什么错了?

0 个答案:

没有答案