npm PhpStorm CSSO文件监视器:保存后出错

vfh0ocws  于 2022-12-13  发布在  PHP
关注(0)|答案(1)|浏览(132)

我已经按照PhpStorm官方文档的建议安装了CSS minifier,但是出现了以下错误:

cmd.exe /D /C call C:\Users\douglas\AppData\Roaming\npm\csso.cmd -i styles-rca.css -o styles-rca.min.css
C:\Users\douglas\AppData\Roaming\npm\node_modules\csso-cli\node_modules\clap\lib\index.js:1
import { basename, extname } from 'path';
   ^

SyntaxError: Unexpected token {
at Module._compile (internal/modules/cjs/loader.js:723:23)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object.<anonymous> (C:\Users\douglas\AppData\Roaming\npm\node_modules\csso-cli\lib\index.js:3:13)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)

Process finished with exit code 1

下面是我正在使用的配置。
x1c 0d1x PHP Storm :2022.2.3
客户操作系统-客户界面:4.0.1

相关问题