LESS occasionally unable to compile

2019-09-07 11:28发布

I'm currently using Web Essentials 2013 v2.5.3 in VS2013. I use LESS for building my stylesheets.

Up until recently everything regards LESS was working fine, make a change, save and the resulting CSS was updated automatically.

Now for some reason, I intermittently get the behaviour where the resulting CSS is not updated and the following error displays in the VS bottom bar:

Compiling 0 dependent file for style.less

Once the problem starts happening, the only apparent way to fix temporarily is to restart VS. The problem then stops for a while but comes back again at some point later.

I recently installed the Productivity Power Tools (PPT) extension and only noticed this behaviour after that was installed. However I've now disabled PPT and the problem still reoccurs. So this may or may not related.

I've also quite recently tried ReSharper for a while then disabled it some time later so again, that could be related.

Any ideas appreciated.

UPDATE 1 2015-05-14

I noticed that when this happens I'm getting the following message in the "Build" window:

Something went wrong reaching: http://127.0.0.1:62583/?service=LESS&sourceFileName=C:/Path/To/Project/ProjectDir/Content/style.less&targetFileName=C:/Path/To/Project/ProjectDir/Content/style.css&mapFileName=C:/Path/To/Project/ProjectDir/Content/style.css.map&sourceMapURL&autoprefixer&autoprefixerBrowsers=last 5 versions

1条回答
Summer. ? 凉城
2楼-- · 2019-09-07 11:56

I've worked out what is causing this to happen. Everything is fine until I attempt to edit and save a JS file. The following is then sent to the Build output window:

Something went wrong reaching: http://127.0.0.1:14886/?service=JSCS&sourceFileName=C:/Path/To/Project/ProjectDir/Scripts/order.js

Any time after that, I get the error message when trying to save the LESS file as well so I'm assuming that whatever is breaking within the JSCS world of Web Essentials is also then causing the LESS compilation to also break.

I've fixed it by effectively almost disabling JSCS using the answer submitted here by Bryan Rayner.

LESS files seem to be back to compiling as normal.

查看更多
登录 后发表回答