我尝试在Windows 7上使用较少的编译器。我使用正确的命令安装 node.js 和 less 。
我在Phpstorm工作,我试图添加Less观察者。它失败了。
An exception occurred while executing watcher 'LESS'. Watcher has been disabled. Fix it. Cannot run program "Path/to/lessc" (in directory "Path/to/css/directory"): CreateProcess error=193, %1 is not a valid Win32 application
所以,最后一次机会,我尝试使用命令编译
lessc my-css.less > my-css.css / lessc.cmd my-css.less > my-css.css
结果很奇怪:
ParseError: directive options not recognised in 'Path/to/my/less/file'
当我尝试添加cmd的扩展名时,结果为:
/c/Users/blabla/AppData/Roaming/npm/lessc.cmd: line 1: syntax error nearunexpected token `('/c/Users/blabla/AppData/Roaming/npm/lessc.cmd: line 1:`@IF EXIST "%~dp0\node.exe" ('
有什么想法吗?我有点失落......
似乎产生错误的代码是:
@widthsite = 100%;
@maincolor1 = #1f2b54; // purple
@maincolor1-5 = #6f7792; // light purple
@maincolor2 = #809a56; // green
@maincolor3 = #9c9b9b; // grey
@maincolor4 = #e0e0e0; // grey2