LESS偶尔无法编译 [英] LESS occasionally unable to compile

查看:114
本文介绍了LESS偶尔无法编译的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前使用的Web要点在VS2013 2013 v2.5.3。我用我的建筑样式更少。

直到最近都认为LESS是工作的罚款,做出改变,保存和产生的CSS被自动更新。

现在出于某种原因,我得到间歇性地在不更新所产生的CSS的行为,并在VS底部栏显示以下错误:


  

编译为style.less 0依赖文件


一旦问题发生开始,临时固定的唯一明显的方法是重新启动VS.那么问题会停止一段时间,但再回来在一些点以后。

我最近安装了生产力电动工具(PPT)扩展,只有安装后发现此行为。不过,我现在已经被禁用PPT和问题仍然再次出现。因此,这可能会或可能不相关的。

我也相当最近尝试ReSharper的一段时间再后来因此再次禁用它一些时间,这可能是相关的。

任何想法AP preciated。

更新2015年5月14日1

我注意到,当发生这种情况,我在生成窗口收到以下消息:


  

出了错达到:<一href=\"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&auto$p$pfixer&auto$p$pfixerBrowsers=last\" rel=\"nofollow\">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&auto$p$pfixer&auto$p$pfixerBrowsers=last 5版本



解决方案

我工作是什么原因造成这种情况发生。一切都很好,直到我尝试编辑和保存JS文件。再下面是发送到生成输出窗口:


  

出了错达到:<一href=\"http://127.0.0.1:14886/?service=JSCS&sourceFileName=C:/Path/To/Project/ProjectDir/Scripts/order.js\" rel=\"nofollow\">http://127.0.0.1:14886/?service=JSCS&sourceFileName=C:/Path/To/Project/ProjectDir/Scripts/order.js


在任何时候,我得到当试图保存用较少的文件,以及让我假设无论是网站必备的JSCS世界中打破也导致随后的LESS编译也打破了错误消息。

我已经通过有效地利用几乎禁止JSCS <固定它href=\"http://stackoverflow.com/questions/22363026/how-can-i-disable-jscs-in-web-essentials-for-visual-studio-2013#answer-24208394\">the回答布莱恩·雷纳这里提交。

LESS文件似乎又回到了编译正常。

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

解决方案

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.

这篇关于LESS偶尔无法编译的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆