Less 更少的文件监视程序在编译期间提供SyntaxError:意外标记

Less 更少的文件监视程序在编译期间提供SyntaxError:意外标记,less,webstorm,Less,Webstorm,我在Webstorm 9.0.2中设置了一个LESS文件观察程序,每次保存编辑内容时,都会将main.LESS文件编译到main.css 我是这样设置的: 这是我的main.less文件中的内容 body {color:#fff} 但是,在编译阶段,控制台中出现以下错误: "C:/Program Files/nodejs/node.exe" main.less E:\Ornico Work\socialdashboardAngular\app\styles\main.less:1 (fun

我在Webstorm 9.0.2中设置了一个LESS文件观察程序,每次保存编辑内容时,都会将main.LESS文件编译到main.css

我是这样设置的:

这是我的main.less文件中的内容

body {color:#fff}
但是,在编译阶段,控制台中出现以下错误:

"C:/Program Files/nodejs/node.exe" main.less

E:\Ornico Work\socialdashboardAngular\app\styles\main.less:1
(function (exports, require, module, __filename, __dirname) { body {
                                                               ^
SyntaxError: Unexpected token {
at Module._compile (module.js:439:25)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:906:3

Process finished with exit code 8

我是Webstorm的新手,对错误的含义和修复方法知之甚少。如果可能的话,有人能帮我吗?

为什么要使用node.js来编译.less文件?节点本身无法做到这一点-您需要安装LESS编译器(
npm install LESS-g
),并在LESS文件查看器中指定一个作为程序的路径。 比如:


还要确保勾选“从stdout创建输出”

为什么要使用node.js编译.less文件?节点本身无法做到这一点-您需要安装LESS编译器(
npm install LESS-g
),并在LESS文件查看器中指定一个作为程序的路径。 比如:


还要确保勾选
'createoutput from stdout'

检查
LESS
文件中的
正文
样式。有点不对劲。这就是我的less文件体{color:#fff};右大括号后不需要分号。删除“;”后仍然不起作用。请将
LESS
文件内容添加到问题中。请检查
LESS
文件中的
正文
样式。有点不对劲。这就是我的less文件体{color:#fff};结束大括号后不需要分号。删除“;”后仍不起作用,请在问题中添加
LESS
文件内容。
Program: C:\Users\Your.Name\AppData\Roaming\npm\lessc.cmd
Arguments: --no-color $FileName$
Workingh dir: $FileDir$
Output paths: $FileNameWithoutExtension$.css