首页 > 解决方案 > PhpStorm Less watcher 不能使用 clean-css 插件和 autoprefix

问题描述

我对 Less 有以下问题。我已将 Less 文件观察器配置为与 PhpStorm 一起使用,到目前为止一切正常。现在我添加了一些插件 clean-css 和 autoprefix ,突然一切都停止了。

我得到的错误:

SyntaxError: Cannot find module '/usr/local/lib/node_modules/less-plugin-autoprefix/lib/clean-css-processor' in /usr/local/lib/node_modules/less-plugin-clean-css/lib/index.js on line 1, column 29:

我的参数是:

$FileName$ ../../css/$FileNameWithoutExtension$.css --no-color $FileNameWithoutExtension$ --clean-css --autoprefix="last 5 versions"

clean-css 插件和 autoprefixs 只能单独工作。如果我将它们加在一起,我会得到错误。有任何想法吗?

标签: lessphpstorm

解决方案


推荐阅读